Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ async function fetch_tweets(cursor, retry = 0) {

if (!response.ok) {
if (response.status === 429) {
console.log("Rate limit reached. Waiting 1 minute")
await sleep(1000 * 60);
console.log("Rate limit reached. Waiting 5 minutes")
await sleep(1000 * 300);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend making the time calculation more explicit
1000 * 60 * 5

return fetch_tweets(cursor, retry + 1)
}
if (retry == 5) {
Expand Down