Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for COVID-19 stream #1790

Closed
utanashati opened this issue Jan 25, 2022 · 4 comments
Closed

Add support for COVID-19 stream #1790

utanashati opened this issue Jan 25, 2022 · 4 comments
Labels
Feature Request This is requesting a new feature Stale This is inactive, outdated, too old, or no longer applicable

Comments

@utanashati
Copy link

utanashati commented Jan 25, 2022

Hi! I've been successfully using tweepy for streaming from POST statuses/filter in a research lab. Now I'd like to rewrite the app that streams from the COVID-19 stream with tweepy as well, since it has all the necessary wrappings for Twitter connections. The endpoint is GET /labs/1/tweets/stream/covid19 + partition query (4 partitions total to boost throughput, this is a huge stream with 10mils tweets per day).

I imagine this could easily be done by adding a function like tweepy.Stream.filter/sample to streaming.py and allowing custom urls in tweepy.Stream._connect. I think adding this feature could help other researchers to stream from the COVID-19 stream easier.

@Harmon758
Copy link
Member

Harmon758 commented Jan 29, 2022

This was originally part of #1472 with support for Labs.
I asked one of the Twitter Developer Advocates I'm in touch with about adding support for it and inquired about the state of Labs when Twitter API v2 launched, as I believe this is the only remaining endpoint in Labs. From my understanding, it's in the unique position of being supported but no longer accepting applications. We discussed how this was the case and how anyone who had access likely already established other methods to use the endpoint, so at the time, I came to the decision of not working on adding support for it.

I'm not adverse to doing so, but there's the question of how much longer this endpoint will continue to exist. I'm also not sure it would a good idea to advertise support for it, as that might lead to questions about how to obtain access to it. I've reached back out to Twitter about this, and I'm going to wait to hear back before proceeding with anything.

@andypiper
Copy link

Hi from @twitterdev - as mentioned above, we're delighted to see the interest in adding this endpoint as formally supported in tweepy, but since there are no plans to provide new access (and this endpoint will in the future be retired, as it was always intended as a point-in-time research tool), and we would not want to set an expectation that this functionality is available to new developers, it might be an idea to leave this as a separate branch rather than part of the core code. Just my 2c.

@Harmon758
Copy link
Member

@utanashati As part of adding support for streaming with Twitter API v2 with 86244c1, I've refactored Stream to inherit from a new BaseStream class. It should be easier now to create a class for COVID-19 streaming that inherits from BaseStream. If you'd like to update #1791 to do that, I'll review the PR.

@Harmon758 Harmon758 linked a pull request Feb 20, 2022 that will close this issue
@Harmon758 Harmon758 changed the title Add Twitter COVID-19 stream to Stream Add support for COVID-19 stream Feb 20, 2022
@Harmon758
Copy link
Member

With the COVID-19 stream endpoint being deprecated, as part of Twitter Developer Labs being deprecated, and set to be retired on October 31, 2022, and with #1791 incomplete, I'm going to close this now.

@Harmon758 Harmon758 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 2, 2022
@Harmon758 Harmon758 added the Stale This is inactive, outdated, too old, or no longer applicable label Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request This is requesting a new feature Stale This is inactive, outdated, too old, or no longer applicable
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants