How can I get tweets older than a week (using tweepy or other python libraries)

后端 未结 8 630
予麋鹿
予麋鹿 2020-11-27 02:55

I have been trying to figure this out but this is a really frustrating. I\'m trying to get tweets with a certain hashtag (a great amount of tweets) using Tweepy. But this do

8条回答
  •  轮回少年
    2020-11-27 03:24

    Found one code that would help retrieve older tweets. https://github.com/Jefferson-Henrique/GetOldTweets-python

    To get old tweets, run the following command in the directory where the code repository got extracted.

    python Exporter.py --querysearch 'keyword' --since 2016-01-10 --until 2016-01-15 --maxtweets 1000
    

    And it returned a file 'output_got.csv' with 1000 tweets during the above days with your keyword

    You need to install a module 'pyquery' for this to work

    PS: You can modify 'Exporter.py' python code file to get more tweet attributes as per your requirement.

提交回复
热议问题