Twitter Tweets - User ID.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:Web-Scraping-and-Python-Codes 作者: dushyantRathore 项目源码 文件源码
def get_tweets(user_id):
    api = twitter.Api(consumer_key=c_key, consumer_secret=c_secret, access_token_key=a_key,
                      access_token_secret=a_secret)

    # print api.VerifyCredentials()

    l = []
    t = api.GetUserTimeline(user_id=user_id, count=25)
    # print t
    tweets = [i.AsDict() for i in t]

    for i in tweets :
        l.append(i['text'])

    print l
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号