猫史档案馆


【教程】利用python获取最古老的帖子

用户:ZH-Y-QZH-Y-Q查看:0 回复:4 评论:0 创建时间:2020-05-13T18:19:44


import requests
for i in range(100):
	print(str(i+1)+':')
	print(requests.get('https://api.codemao.cn/web/forums/posts/'+str(i)+'/details/').content)

清清爽爽,简简单单,4行代码,搞定问题(doge

运行后,您只要看到哪个输出和其他的长度不一样,那么这就是最古老的帖子了……

目测https://shequ.codemao.cn/community/54


回复

上一页1 页 / 共 1下一页
ZH-Y-QZH-Y-Q

dd

点赞0


评论


三百克薄荷油三百克薄荷油

是的,54是最早的帖子了

点赞1


评论


哇c哇c

https://shequ.codemao.cn/community/1317

点赞0


评论


艾博士艾博士

https://shequ.codemao.cn/community/1317

点赞0


评论