Skip to content

Commit 3ba85e8

Browse files
authored
Add files via upload
1 parent d67df8b commit 3ba85e8

File tree

10 files changed

+3590
-0
lines changed

10 files changed

+3590
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# coding:utf-8
2+
3+
# @Time : 2022/5/10 16:30
4+
# @Author: Python进阶者
5+
# @公众号: Python爬虫与数据挖掘
6+
# @website : http://pdcfighting.com/
7+
# @File : 头条jsrpc.py
8+
# @Software: PyCharm
9+
10+
import requests
11+
import json
12+
import urllib.parse
13+
import time
14+
15+
16+
param_url = "http://127.0.0.1:12080/go?group=para&name=test&action=get_para"
17+
response = requests.get(url=param_url).text
18+
response_json = json.loads(response)
19+
sign = response_json["get_para"]
20+
print(sign)
21+
behot_time = int(time.time())
22+
params = {
23+
"offset": 0,
24+
"channel_id": 0,
25+
"max_behot_time": 1641416108,
26+
"category": "pc_profile_recommend",
27+
"aid": 24,
28+
"app_name": "toutiao_web",
29+
"disable_raw_data": "true",
30+
"_signature": sign
31+
}
32+
url = f'https://www.toutiao.com/api/pc/list/feed'
33+
34+
response_detail = requests.get(url, params=params).json()
35+
print(response_detail["data"])
36+

0 commit comments

Comments
 (0)