做了一个简单的Twitter数据案例,采集用户的基本信息和发布的推文。
代码上传到案例仓库中了: https://github.com/lixi5338619/lxSpider
正文内容:
观察了一下接口,推文列表数据在 “https://twitter.com/i/api/2/timeline/profile/1194464827839631360.json?” 的Api中
需要注意只有 1194464827839631360这个ID,然后在控制台 ctrl+F搜索这个ID,
发现在 'https://twitter.com/i/api/graphql/hc-pka9A7gyS3xODIafnrQ/UserByScreenName? 接口中返回了rest_id,
rest_id:
这个接口不仅有rest_id 还有粉丝数、