Rishikant181 / Rettiwt-API

A CLI tool and an API for fetching data from Twitter for free!
https://rishikant181.github.io/Rettiwt-API/
MIT License
397 stars 37 forks source link

Error: NotFound #315

Closed HohShenYien closed 1 year ago

HohShenYien commented 1 year ago

Thanks for the amazing work!

I have started encountering NotFound error from tweets.getTweets function just a few hours ago, wondering if it's issue from the Twitter's API side

Current Behavior

When I am calling the rettiwt.tweets.getTweets, the following error shows up

Error: NotFound
    at TweetService.FetcherService.handleHTTPError (...\node_modules\rettiwt-api\dist\services\util\FetcherService.js:123:19)
    at ...\node_modules\rettiwt-api\dist\services\util\FetcherService.js:178:123

Steps to Reproduce

The following shows the full codes

   // I have obtained the cookies from browser's cookie storage directly, and it works for getUserDetails
    const rettiwt = Rettiwt({
      auth_token: process.env.TWITTER_AUTH_TOKEN ?? "",
      ct0: process.env.TWITTER_CT0 ?? "",
      kdt: process.env.TWITTER_KDT ?? "",
      twid: process.env.TWITTER_TWID ?? "",
    });

    let tweets = await rettiwt.tweets.getTweets(
      {
        words: ["twitter"],
      },
      15
    );

Context

I have updated the package to the newly released "rettiwt-api": "^1.2.0",

Additional Details

I have also tried to check the URL generated for the FetcherService, it appears to look alright

https://api.twitter.com/2/search/adaptive.json?include_entities=true&include_quote_count=true&include_reply_count=1&include_user_entities=true&include_want_retweets=1&tweet_mode=extended&tweet_search_mode=live&q=(%23twitter)%20-this%3Alinks&count=15

Moreover, the above code was working in the morning today, and it started to fail now 🤕

Rishikant181 commented 1 year ago

Something has changed yet on Twitter. Let me check.

Rishikant181 commented 1 year ago

Twitter has changed its endpoints once again. Changes might take some time.

This issue is being tracked at Rishikant181/Rettiwt-Core#15

Thanks for your patience!

Rishikant181 commented 1 year ago

@HohShenYien The issue has been fixed. Please update to the latest version and remember to use this method to fetch tweets.

HohShenYien commented 1 year ago

Thank you so much @Rishikant181!

Rishikant181 commented 1 year ago

@HohShenYien There was a login issue in v1.3.0. Please update to the latest one (v1.3.1).

Sorry for the inconvenience.

HohShenYien commented 1 year ago

Got it, @Rishikant181. Thank you for the prompt update!