trevorhobenshield / twitter-api-client

Implementation of X/Twitter v1, v2, and GraphQL APIs
https://pypi.org/project/twitter-api-client
MIT License
1.59k stars 216 forks source link

Twitter search seems broken #22

Closed kinoute closed 1 year ago

kinoute commented 1 year ago

I think Twitter has recently changed something related to the advanced search – needs login now? With the latest commit:


In [2]: from twitter.search import search
   ...:
   ...: r = search('Elon Musk',limit=100)
   ...: print(r)
2023-04-21 06:43:29,735.735 DEBUG: 'timeline'
2023-04-21 06:43:29,736.736 DEBUG: No data for: Elon Musk | retrying in 1.71 seconds
2023-04-21 06:43:31,589.589 DEBUG: 'timeline'
2023-04-21 06:43:31,590.590 DEBUG: No data for: Elon Musk | retrying in 2.67 seconds
2023-04-21 06:43:34,392.392 DEBUG: 'timeline'
2023-04-21 06:43:34,392.392 DEBUG: No data for: Elon Musk | retrying in 4.54 seconds
2023-04-21 06:43:39,071.071 DEBUG: 'timeline'
2023-04-21 06:43:39,071.071 DEBUG: No data for: Elon Musk | retrying in 8.01 seconds
2023-04-21 06:43:47,216.216 DEBUG: 'timeline'
2023-04-21 06:43:47,216.216 DEBUG: No data for: Elon Musk | retrying in 16.75 seconds
``
nerra0pos commented 1 year ago

Search is not any more accessible to the public.

See also: https://github.com/JustAnotherArchivist/snscrape/issues/846

Can this be done via graphql? It looks like Nitter got it working.

trevorhobenshield commented 1 year ago

Thanks for the heads up, just fixed it.

Search will now need an email, username, and password just like Account and Scraper.