小Demo
import requests
import re
import execjs
url = 'https://ac.scmor.com/'
headers = {
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36',
}
response = requests.get(url=url,headers=headers)
response.encoding = 'utf-8'
page_text = response.text
pattern = re.compile('autourl\=\[(.*?)\]',re.S)
tag = re.findall(pattern,page_text)[0]
detail_pattern = re.compile('\"(.*?)\"')
tag_list = re.findall(detail_pattern,tag)
print(tag_list)
node = execjs.get()
cxt = node.compile(open("./JsTest1.js",encoding='utf8').read())
for i in tag_list:
js = 'strdecode("{0}")'.format(i)
ret_url = cxt.eval(js)
print(ret_url)
解析结果
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/2f35d8667fd129e0bb4f7b9381a6255e.png)