48 lines
1.8 KiB
Python
48 lines
1.8 KiB
Python
import requests
|
|
import execjs
|
|
import time
|
|
|
|
|
|
headers = {
|
|
"accept": "application/json, text/plain, */*",
|
|
"accept-language": "zh-CN,zh;q=0.9",
|
|
"cache-control": "no-cache",
|
|
"pragma": "no-cache",
|
|
"priority": "u=1, i",
|
|
"referer": "https://buyin.jinritemai.com/dashboard/inspiration-center/hot-video?pre_universal_page_params_id=&universal_page_params_id=006e74e0-314e-4d78-8987-90bb020ed52b",
|
|
"sec-ch-ua": "\"Google Chrome\";v=\"135\", \"Not-A.Brand\";v=\"8\", \"Chromium\";v=\"135\"",
|
|
"sec-ch-ua-mobile": "?0",
|
|
"sec-ch-ua-platform": "\"Windows\"",
|
|
"sec-fetch-dest": "empty",
|
|
"sec-fetch-mode": "cors",
|
|
"sec-fetch-site": "same-origin",
|
|
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36"
|
|
}
|
|
cookies = {
|
|
"SASID": "SID2_7499461659310096677",
|
|
|
|
}
|
|
ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36';
|
|
|
|
url = "https://buyin.jinritemai.com/api/anchor/creative/search_videos"
|
|
for page in range(1, 11):
|
|
time.sleep(1)
|
|
a_bogus = execjs.compile(open('day01.js','r',encoding='utf-8').read()).call('get_a_bogus',ua,page)
|
|
print(a_bogus)
|
|
print(len(a_bogus))
|
|
params = {
|
|
"industry_id": "4",
|
|
"level": "3",
|
|
"time_range_id": "2",
|
|
"sort_id": "2",
|
|
"sort_type": "2",
|
|
"page": str(page),
|
|
"page_size": "10",
|
|
"a_bogus": a_bogus,
|
|
# "verifyFp": "verify_m9zpgzxs_9rZzTJwA_YZDx_48P8_A5t2_1w8FcwOKRsLf",
|
|
# "fp": "verify_m9zpgzxs_9rZzTJwA_YZDx_48P8_A5t2_1w8FcwOKRsLf"
|
|
}
|
|
response = requests.get(url, headers=headers, cookies=cookies, params=params)
|
|
|
|
print(response.text)
|
|
print(response) |