通过Python获取Twitter数据
2017-08-28 14:34:34 1 举报
AI智能生成
登录查看完整内容
Python获取twitter数据
作者其他创作
大纲/内容
通过Python获取Twitter数据
Python 零基础
Data on Twitter
user profile
twitter id
description
location
link to other websites
Joined date
Tweets
contents of the tweet
texts
images
videos
replies
回复的人
回复的内容
回复的时间等
retweeted info
转发的人
转发的内容
转发的时间等
likes
点赞的人
点赞的时间
Following(关注的账户)
Followers(粉丝)
Twitter Public API
申请
官网
Twitter API 申请官网
得到什么
consumer_key
consumer_secret
access_token
access_token_secret
利用这四个keys连接、认证API
Limit Ratethe number of calls it allows each user to make
15 calls per 15-minute period
followers
180 calls per 15-minute period
Data Limit
Collect Data by Twitter Public API
包
python-twitter
twitter
...
Tweepy
tweepy官网资料
连接、认证 API
方法
.get_user()
返回用户信息
.home_timeline()
返回API所对应账户的tweets
.user_timeline
返回指定应账户的tweets
.friends_ids()
返回关注的用户ID
.followers_ids()
返回粉丝用户ID
.follwers()
返回粉丝用户信息
数据库
sqlite3
SQL Server
代理IP
免费代理IP
付费代理IP
Notes
因为Limit Rate的原因,不是所有(历史)数据都能通过API返回
因为Limit Rate的原因, 一个API不能连续请求获取数据
不能通过API获取的数据,可以直接从网页上面抓取
Twitter数据抓取需要通过VPN实现,现在我有解决方案,正在开发完整的数据抓取,存储以及分析的工作,会不停服24小时更新,敬请关注! 任何问题欢迎email:lwq07010328@163.com
0 条评论
回复 删除
下一页