python - 根据特定日期抓取推特数据

标签 python twitter python-twitter

我是 twitter Api 的新手,所以我不知道它在更广泛意义上的用途,实际上我正在 Ghaza 上抓取推文以进行分析,我抓取了它,但作为页面示例,这就是我所做的

while(page<=3):
    tweets=api.GetSearch("#Egypt",per_page=100)

现在我想抓取数据,但是从特定日期开始,比如我想抓取从 2010 年 2 月 2 日到 2012 年 3 月 7 日的数据。只要有线索就足够了,但我们不胜感激。

最佳答案

自 2014 年 2 月 1 日至 2014 年 2 月 5 日使用 [query] ( link to docs )

查询运算符

Operator                    Finds tweets…
...
superhero since:2015-07-19  containing “superhero” and sent since date “2015-07-19” (year-month-day).
ftw until:2015-07-19        containing “ftw” and sent before the date “2015-07-19”.
...

关于python - 根据特定日期抓取推特数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12215671/

相关文章:

python - 从特定日历 Google API Python 获取事件

iphone - 网站上的 Twitter feed 无法在 iPad、iPhone 和类似设备上运行

cocoa - Mountain Lion 中的 Twitter.framework?

python - 多线程 python 应用程序在运行其线程时挂起

静态方法中的 Python 引用子类

python - xarray - 从另一个 DataArray 的时间标签中选择/索引 DataArray

javascript - 使用 Twitter API 检查好友关系的存在

python - 如何使用 python-twitter 删除所有推文?

Python-twitter api.VerifyCredentials() 返回 none

python - 如何获取一周以上的推文?