1.  url:http://www.300600900.cn/

2. target:

 js加密(五)产品目录
    





            
js加密(四)landChina

 

 

 3. 简单分析

偶然发现,这个网站的加密,和landChina加密一模一样,js函数的名字都一样。。。所以,只贴出一些代码,有兴趣可以参考:

4. 代码:

from afterWork.config import userAgent, proxies
import requests
import re
import execjs

targetUrl = 'http://www.300600900.cn/'
sess = requests.session()
res = sess.get(url=targetUrl)
# print(res.text)

# 执行js
with open('jsCode.js', 'r') as f:
    jsCode = f.read()
ctx = execjs.compile(jsCode)
result = ctx.call('YunSuoAutoJump')
# print(result)
secondUrl = 'http://www.300600900.cn' + result
# print(secondUrl)

_ = sess.get(url=secondUrl)
res3 = sess.get(url=targetUrl)
# print(res3.encoding)
res3.encoding = 'UTF-8'
# print(res3.text)
regForInfo = r'<h2>(.*?)</h2>'
productList = re.findall(regForInfo, res3.text)
for info in productList:
    print(info)

结果:

js加密(五)产品目录
    





            
js加密(四)landChina

 

 学习交流,勿作他用。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2021-11-19
  • 2021-11-19
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-11
  • 2021-11-20
  • 2021-04-22
  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
  • 2021-11-19
相关资源
相似解决方案