网站地址
请求数据
http://gbcdn.dfcfw.com/rank/popularityList.js?type=0&sort=0&page=1&v=2022_6_28_15_38
视频教程
https://www.bilibili.com/video/BV1NU4y1X7YR/
Python代码
import base64,requests,re,urllib3,hashlib
from Crypto.Cipher import AES
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
def aesCbcDecode(content,key, iv,pkcs=5):
try:
key_bytes = bytes(key, encoding='utf-8')
iv = bytes(iv, encoding='utf-8')
cipher = AES.new(key_bytes, AES.MODE_CBC, iv)
aes_encode_bytes = base64.b64decode(content)
aes_decode_bytes = cipher.decrypt(aes_encode_bytes)
result = str(aes_decode_bytes, encoding='utf-8')
if pkcs==7:
result = pkcs7unpadding(result)
except:
pass
else:
return result
def pkcs7unpadding(text):
try:
length = len(text)
unpadding = ord(text[length - 1])
return text[0:length - unpadding]
except Exception as e:
pass
url=f'https://gbcdn.dfcfw.com/rank/popularityList.js?type=0&sort=0&page=1&v=2022_6_28_15_00'
resp=requests.get(url,verify=False)
e=re.search(r"popularityList='(.*?)'",resp.text).group(1)
iv='getClassFromFile'
key=hashlib.md5('getUtilsFromFile'.encode(encoding='UTF-8')).hexdigest()
deResp=aesCbcDecode(e,key,iv,7)
print(deResp)
声明:①本站为个人博客,博客所发布的一切修改补丁、注册机和注册信息及软件的文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。②本站信息来自网络,版权争议与本站无关,您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。访问和下载本站内容,说明您已同意上述条款。③本站为非盈利性站点,VIP功能仅仅作为用户喜欢本站捐赠打赏功能,不开通VIP同样可以通过每日签到免费获取积分下载所有软件资源,本站不贩卖软件,所有内容不作为商业行为。