the-convocation / twitter-scraper

A port of n0madic/twitter-scraper to Node.js.
https://the-convocation.github.io/twitter-scraper/
MIT License
206 stars 42 forks source link

fetchSearchTweets 404 #77

Open huksley opened 8 months ago

huksley commented 8 months ago

I observe different url: https://twitter.com/i/api/graphql/-KWrbTBsPifMuLUqqDiU_A/SearchTimeline?variables=%7B%22rawQuery%22%3A%22javascript%22%2C%22count%22%3A20%2C%22querySource%22%3A%22typed_query%22%2C%22product%22%3A%22Top%22%7D&features=%7B%22responsive_web_graphql_exclude_directive_enabled%22%3Atrue%2C%22verified_phone_label_enabled%22%3Afalse%2C%22creator_subscriptions_tweet_preview_api_enabled%22%3Atrue%2C%22responsive_web_graphql_timeline_navigation_enabled%22%3Atrue%2C%22responsive_web_graphql_skip_user_profile_image_extensions_enabled%22%3Afalse%2C%22c9s_tweet_anatomy_moderator_badge_enabled%22%3Atrue%2C%22tweetypie_unmention_optimization_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%22responsive_web_twitter_article_tweet_consumption_enabled%22%3Atrue%2C%22tweet_awards_web_tipping_enabled%22%3Afalse%2C%22freedom_of_speech_not_reach_fetch_enabled%22%3Atrue%2C%22standardized_nudges_misinfo%22%3Atrue%2C%22tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled%22%3Atrue%2C%22rweb_video_timestamps_enabled%22%3Atrue%2C%22longform_notetweets_rich_text_read_enabled%22%3Atrue%2C%22longform_notetweets_inline_media_enabled%22%3Atrue%2C%22responsive_web_enhance_cards_enabled%22%3Afalse%7D

⨯ ApiError: Response status: 404
    at Function.fromResponse (webpack-internal:///(rsc)/./node_modules/@the-convocation/twitter-scraper/dist/errors.js:22:16)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at requestApi (webpack-internal:///(rsc)/./node_modules/@the-convocation/twitter-scraper/dist/api.js:55:18)
    at getSearchTimeline (webpack-internal:///(rsc)/./node_modules/@the-convocation/twitter-scraper/dist/search.js:96:17)
    at fetchSearchTweets (webpack-internal:///(rsc)/./node_modules/@the-convocation/twitter-scraper/dist/search.js:38:22)
    at findTweets (webpack-internal:///(rsc)/./app/api/tweet/route.ts:63:21) {
  response: Response {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
    [Symbol(Response internals)]: {
      url: 'https://api.twitter.com/graphql/gkjsKepM6gl_HmFWoWKfgg/SearchTimeline?features=%7B%22android_graphql_skip_api_media_color_palette%22%3Afalse%2C%22blue_business_profile_image_shape_enabled%22%3Afalse%2C%22creator_subscriptions_subscription_count_enabled%22%3Afalse%2C%22creator_subscriptions_tweet_preview_api_enabled%22%3Atrue%2C%22freedom_of_speech_not_reach_fetch_enabled%22%3Atrue%2C%22graphql_is_translatable_rweb_tweet_is_translatable_enabled%22%3Atrue%2C%22interactive_text_enabled%22%3Afalse%2C%22longform_notetweets_consumption_enabled%22%3Atrue%2C%22longform_notetweets_inline_media_enabled%22%3Atrue%2C%22longform_notetweets_rich_text_read_enabled%22%3Atrue%2C%22responsive_web_edit_tweet_api_enabled%22%3Atrue%2C%22responsive_web_enhance_cards_enabled%22%3Afalse%2C%22responsive_web_graphql_exclude_directive_enabled%22%3Atrue%2C%22responsive_web_graphql_skip_user_profile_image_extensions_enabled%22%3Afalse%2C%22responsive_web_graphql_timeline_navigation_enabled%22%3Atrue%2C%22responsive_web_media_download_video_enabled%22%3Afalse%2C%22responsive_web_text_conversations_enabled%22%3Afalse%2C%22responsive_web_twitter_article_tweet_consumption_enabled%22%3Afalse%2C%22rweb_lists_timeline_redesign_enabled%22%3Atrue%2C%22standardized_nudges_misinfo%22%3Atrue%2C%22subscriptions_verification_info_enabled%22%3Atrue%2C%22subscriptions_verification_info_reason_enabled%22%3Atrue%2C%22subscriptions_verification_info_verified_since_enabled%22%3Atrue%2C%22super_follow_badge_privacy_enabled%22%3Afalse%2C%22super_follow_exclusive_tweet_notifications_enabled%22%3Afalse%2C%22super_follow_tweet_api_enabled%22%3Afalse%2C%22super_follow_user_api_enabled%22%3Afalse%2C%22tweet_awards_web_tipping_enabled%22%3Afalse%2C%22tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled%22%3Atrue%2C%22tweetypie_unmention_optimization_enabled%22%3Atrue%2C%22unified_cards_ad_metadata_container_dynamic_card_content_query_enabled%22%3Afalse%2C%22verified_phone_label_enabled%22%3Afalse%2C%22vibe_api_enabled%22%3Afalse%2C%22view_counts_everywhere_api_enabled%22%3Atrue%7D&fieldToggles=%7B%22withArticleRichContentState%22%3Afalse%7D&variables=%7B%22count%22%3A30%2C%22product%22%3A%22Latest%22%2C%22querySource%22%3A%22typed_query%22%2C%22rawQuery%22%3A%22twitter%22%7D',
      status: 404,
      statusText: 'Not Found',
      headers: [Headers],
      counter: 0
    }
  },
  data: undefined
}