utils.py 463 B

1234567891011121314151617181920212223
  1. # -*- coding: utf-8 -*-
  2. """
  3. Created on 2025-04-08
  4. ---------
  5. @summary: 采集工具
  6. ---------
  7. @author: Dzr
  8. """
  9. import re
  10. import execjs
  11. jst = re.compile("javascript:todetail\('(.*?)'", flags=re.S)
  12. jsd = re.compile("javascript:toGetContent\('(.*?)'", flags=re.S)
  13. numb = re.compile(",'(.*?)'", flags=re.S)
  14. def get_ck():
  15. with open('./zghdjtgsdzswpt.js', 'r') as fr:
  16. ex_js = fr.read()
  17. ctx = execjs.compile(ex_js)
  18. return ctx.call('create_ck')