JustAnotherArchivist / snscrape

A social networking service scraper in Python
GNU General Public License v3.0
4.52k stars 712 forks source link

Twitter Search return empty pages starting May 25 #920

Closed digfish closed 1 year ago

digfish commented 1 year ago

Describe the bug

On searching for tweets of some user, it is returning "Stopping after 20 empty pages". In shorter times, the searching is failing. Besides that, the complete URL used in the search is blocked.

How to reproduce

last_tweets = []
    for i,item in enumerate(twitter.TwitterSearchScraper("from:digfish").get_items()):
        if i > 10:
            break
        else:
            last_tweets.append(item)

Expected behaviour

It should return the twitter scrap objects representing each twitter search result.

Screenshots and recordings

No response

Operating system

Windows 10

Python version: output of python3 --version

3.10.4

snscrape version: output of snscrape --version

0.6.2.20230321.dev13+g786815d

Scraper

twitter

How are you using snscrape?

Module (import snscrape.modules.something in Python code)

Backtrace

DEBUG:snscrape.base:... with response headers: {'date': 'Sat, 27 May 2023 17:09:25 GMT', 'perf': '7626143928', 'vary': 'Origin', 'pragma': 'no-cache', 'server': 'tsa_o', 'expires': 'Tue, 31 Mar 1981 05:00:00 GMT', 'content-type': 'application/json; charset=utf-8', 'cache-control': 'no-cache, no-store, must-revalidate, pre-check=0, post-check=0', 'last-modified': 'Sat, 27 May 2023 17:09:25 GMT', 'content-length': '296', 'x-frame-options': 'SAMEORIGIN', 'content-encoding': 'gzip', 'x-transaction-id': 'd6f2ff540aca7d17', 'x-xss-protection': '0', 'x-rate-limit-limit': '200', 'x-rate-limit-reset': '1685208258', 'content-disposition': 'attachment; filename=json.json', 'x-tfe-preserve-body': 'true', 'x-content-type-options': 'nosniff', 'x-rate-limit-remaining': '183', 'x-twitter-response-tags': 'BouncerCompliant', 'strict-transport-security': 'max-age=631138519', 'x-response-time': '226', 'x-connection-hash': 'd77992890656da9d9c3f121e8c33655273d2723e5845b91cf736fc38865b396a'} DEBUG:snscrape.base:https://twitter.com/i/api/graphql/7jT5GT59P8IFjgxwqnEdQw/SearchTimeline?variables=%7B%22rawQuery%22%3A%22from%3Adigfish%22%2C%22count%22%3A20%2C%22cursor%22%3A%22DAADDAABAAgAAgAAAAIIAAMAAAAACAAEAAAADwoABRcSaKaDgCcQCgAGFxJopoN9jwAAAA%22%2C%22product%22%3A%22Latest%22%2C%22withDownvotePerspective%22%3Afalse%2C%22withReactionsMetadata%22%3Afalse%2C%22withReactionsPerspective%22%3Afalse%7D&features=%7B%22rweb_lists_timeline_redesign_enabled%22%3Afalse%2C%22blue_business_profile_image_shape_enabled%22%3Afalse%2C%22responsive_web_graphql_exclude_directive_enabled%22%3Atrue%2C%22verified_phone_label_enabled%22%3Afalse%2C%22creator_subscriptions_tweet_preview_api_enabled%22%3Afalse%2C%22responsive_web_graphql_timeline_navigation_enabled%22%3Atrue%2C%22responsive_web_graphql_skip_user_profile_image_extensions_enabled%22%3Afalse%2C%22tweetypie_unmention_optimization_enabled%22%3Atrue%2C%22vibe_api_enabled%22%3Atrue%2C%22responsive_web_edit_tweet_api_enabled%22%3Atrue%2C%22graphql_is_translatable_rweb_tweet_is_translatable_enabled%22%3Atrue%2C%22view_counts_everywhere_api_enabled%22%3Atrue%2C%22longform_notetweets_consumption_enabled%22%3Atrue%2C%22tweet_awards_web_tipping_enabled%22%3Afalse%2C%22freedom_of_speech_not_reach_fetch_enabled%22%3Afalse%2C%22standardized_nudges_misinfo%22%3Atrue%2C%22tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled%22%3Afalse%2C%22interactive_text_enabled%22%3Atrue%2C%22responsive_web_text_conversations_enabled%22%3Afalse%2C%22longform_notetweets_rich_text_read_enabled%22%3Afalse%2C%22longform_notetweets_inline_media_enabled%22%3Afalse%2C%22responsive_web_enhance_cards_enabled%22%3Afalse%2C%22responsive_web_twitter_blue_verified_badge_is_enabled%22%3Atrue%7D retrieved successfully

Log output

No response

Dump of locals

No response

Additional context

No response

JustAnotherArchivist commented 1 year ago

891