当前位置:网站首页>Baidu knows the crawler, and obtains the dialogue below the comment according to the question Id, clue ID and comment ID
Baidu knows the crawler, and obtains the dialogue below the comment according to the question Id, clue ID and comment ID
2022-06-28 23:24:00 【supramolecular】
import requests
import time
import math
import demjson
comment_request = [{'thread_id': '11817919873', 'qid': '96177926', 'rid': '2954479968'}, {'thread_id': '1260090477', 'qid': '96177926', 'rid': '315022619'}, {'thread_id': '1260687497', 'qid': '96177926', 'rid': '315171874'}, {'thread_id': '11734823241', 'qid': '96177926', 'rid': '2933705810'}, {'thread_id': '1260108277', 'qid': '96177926', 'rid': '315027069'}]
def get_new_comment(param):
t = str(math.floor(time.time()))
# url = "https://zhidao.baidu.com/api/comment?method=get_new_comment&app=qb&thread_id=1260090477&qid=96177926&rid=2954479968"
url = "https://zhidao.baidu.com/api/comment?method=get_new_comment&app=qb&thread_id=" + param['thread_id'] + "&qid=" + param['qid'] + "&rid=" + param['rid'] + "&pn=0&rn=10&r=" + t
print(url)
# url = "https://zhidao.baidu.com/api/comment?method=get_new_comment&app=qb&thread_id=11817919873&qid=96177926&rid=2954479968&pn=0&rn=10&r=" + t
resp = requests.post(url)
comment = resp.json()
if comment['data']['comment_count'] != None:
for item in comment['data']['comment_list']:
str_create_time = item['str_create_time']
content = item['content']
from_uname = item['from_uname']
from_uid = item['from_uid']
to_uid = item['to_uid']
id = param['rid']
print(str_create_time, content, from_uname, from_uid, to_uid, id)
for req in comment_request:
get_new_comment(req)
边栏推荐
- Tanghongbin, Yaya live CTO: to truly localize, the product should not have the attribute of "origin"
- 一张能卖上千万,商家扩张比玩家还快:球星卡的江湖你不懂
- Chapter II Classic synchronous exercises
- LINQ linked table query
- Keil project, RTT cannot print after too many programs are written
- 移动端异构运算技术 - GPU OpenCL 编程(基础篇)
- Flutter obtains the coordinate size of any element in the interface through globalkey
- 在DialogFragment的onStop(完全不可见)时调用dismiss退出界面报错解决办法
- Chapter III processor scheduling exercise
- Matlab learning notes (6) upsample function and downsample function of MATLAB
猜你喜欢

在QT进行cin(全网最清晰教程)

lock4j--分布式锁中间件--使用/实例

CIN at QT (the clearest tutorial in the whole network)
![[mathematical modeling] fmincon() function of MATLAB nonlinear programming](/img/fc/46949679859b1369fcc83d0d8b637c.png)
[mathematical modeling] fmincon() function of MATLAB nonlinear programming

10. Standard i/o redirection and pipeline

计数排序和排序的稳定性
![[conception de la machine d'état] Moore, Mealy State Machine, Three - stage, Two - stage, one - stage State Machine Writing Specification](/img/48/e29f34aff7cc437bfb574591d54e3d.png)
[conception de la machine d'état] Moore, Mealy State Machine, Three - stage, Two - stage, one - stage State Machine Writing Specification

Use conditional breakpoints in vscode (based on GDB)

Tanghongbin, Yaya live CTO: to truly localize, the product should not have the attribute of "origin"

直击产业落地 | 飞桨重磅推出业界首个模型选型工具
随机推荐
从SQL注入绕过最新安全狗WAF中学习fuzz
2022 PMP project management examination agile knowledge points (4)
第五章 虚拟存储器 练习
LeetCode 324 擺動排序 II[排序 雙指針] HERODING的LeetCode之路
urllib.parse 解析url连接中的参数
Undefined symbol main (referred from entry9a.o).
Encounter with avita 11: long lost freshness under strong product power
fio的IO重放功能
LINQ linked table query
2022-06-28: what does the following golang code output? A:true; B:false; C:panic; D: Compilation failed. package main import “fm
O & M troubleshooting - use hcache plug-in to troubleshoot excessive buffer/cache occupancy
表单校验问题——el-select(初始化页面自动触发校验解决办法)
ctfshow XSS
在QT进行cin(全网最清晰教程)
C语言-单词分析解析
Non scientific class! The road of self-study!
Is it difficult to register stocks and open accounts online? Is it safe to open an account online?
第三章 处理机调度练习
window10 phpstudy 安装redis扩展
复杂嵌套的对象池(4)——管理多类实例和多阶段实例的对象池