从 Twitter 获取历史数据

发布于 2024-08-09 05:29:32 字数 1436 浏览 4 评论 0 原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

请远离我 2024-08-16 05:29:32

众所周知,Twitter 不会发布超过三周的“可用”推文。在某些情况下,您只能获得一周的时间。您最好在接下来的三个月内存储推文。许多人有理由怀疑 Twitter 是否还在坚持他们的做法。

您是否正在寻找任何推文?如果是这样,请查看 Streaming API 的 status/sample 方法。流 API 使用持久性 HTTP 套接字,编程起来可能会很痛苦,但当你让它工作时,它会非常优雅。我建议设置一个小脚本将推文从状态/样本转储到数据库中。几天后您就应该获得大量数据。

Twitter notoriously does not make "available" tweets older than three weeks. In some cases you can only get one week. You're better off storing tweets for the next three months. Many rightly doubt if they're even persisted by Twitter.

Are you looking for just any tweets? If so, check out the Streaming API's status/sample method. The streaming API uses persistent HTTP sockets that can be a pain to program, but it's quite graceful when you get it working. I'd recommend setting up a little script to dump tweets from status/sample into a DB. You should have a TON of data after just a few days.

爱冒险 2024-08-16 05:29:32

您可以使用搜索 API,不要进行搜索,每页最多返回 100 个,然后每分钟浏览每个页面两次(每小时 120 次 - 比速率限制低 30 倍)。然而,如果我的数学正确的话,每小时可能会产生 720,000 条推文……问题是 Twitter 在过去 3 个月里增加了大约 17.5 亿条推文。所以如果我的数学正确的话,你需要 2361 天,即 6 年才能完成这个任务。

您可以在 Google 网上论坛的 Twitter 开发讲座上提出这个问题,或者联系 Twitter 加入白名单,这样您每小时最多可以发出 20,000 个请求。

就我个人而言,我认为这是不可能的。

You could use the Search API, don't give it a search, return the maximum of 100 per page, then got through each page twice a minute(120 times an hour - 30 times less than the rate limit). However, if my math is correct, that could possibly give you 720,000 tweets an hour..... the problem is that Twitter has added approximately 1.75 billion tweets over the past 3 months. So if my math is correct, it would take you 2361 days, or 6 years to complete this.

You could ask this question over on the Twitter Development talk on Google Groups, or contact Twitter to get white-listed so you could make up to 20,000 requests an hour.

Personally, I don't think it's possible.

追风人 2024-08-16 05:29:32

DataSift 声称即将推出 Twitter 历史数据 API,您可以在此处注册,以便在其可用时收到通知

DataSift claims to have a twitter historical data api coming soon, you can signup to be notified when its available here.

甚是思念 2024-08-16 05:29:32

当您第一次提出问题时,这可能不存在,但“PeopleBrowsr”API 非常适合此操作,您可以通过单个 API 调用返回 1400 天:https://developer.peoplebrowsr.com/pb

希望有所帮助!

This may not have existed when you first asked the question but the "PeopleBrowsr" API is perfect for this and you can go back 1400 days with a single API call: https://developer.peoplebrowsr.com/pb

Hope that helps!

逆夏时光 2024-08-16 05:29:32

Keyhole 可以为您提供 xls 格式的历史推文或将其呈现在可视化仪表板中。预览仅采样了一些最新的推文,但是,如果您通过电子邮件发送历史数据,则可以请求它们。

请参阅:http://keyhole.co/conversation_tracking

Keyhole can get you historical tweets in xls or present them in a visual dashboard. The preview samples only a few most recent tweets, however, you can request historical data if you email them.

See: http://keyhole.co/conversation_tracking

旧城空念 2024-08-16 05:29:32

您可以使用 Gnip 的 Historic PowerTrack 工具读取 twitter 历史数据。它可以让你访问自第一条推文以来的所有推特数据,而且它是一个非常简单的工具。

You can read the twitter historic data using Gnip's Historic PowerTrack tool. It will give you access to all twitter data since first tweet and fairly it is very simple tool t use.

番薯 2024-08-16 05:29:32

您可以使用我公司构建的名为 Sifter 的服务免费估算数据范围和成本。如果您决定购买数据访问权限,则可以通过我们的文本分析平台 DiscoverText 获取数据,您可以在其中搜索、过滤对数据进行重复数据删除、聚类、人工编码和机器分类。

You can get free estimates for the data scope and cost using a service built by my company called Sifter. If you decide to purchase access to the data it will be available via our text analytics platform DiscoverText, where you can search, filter, de-duplicate, cluster, human code, and machine-classify the data.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文