A simple tool which lets you scrape twitter accounts and crosspost them to bluesky accounts! Comes with a CLI and a webapp for managing profiles! Works with images/videos/link embeds/threads.

fix: allow backfill to continue paginating past processed tweets

jack ec32a3f7 b2e663b3

+8 -1
+8 -1
src/index.ts
··· 1016 1016 } 1017 1017 } 1018 1018 1019 - if (newOnes === 0 || (limit && allFoundTweets.length >= limit)) break; 1019 + if (newOnes === 0 && result.tweets.length > 0) { 1020 + console.log(`[${twitterUsername}] ⏩ Batch contained no new tweets. Continuing to older history...`); 1021 + updateAppStatus({ message: `Skipping seen tweets, digging deeper...` }); 1022 + } 1020 1023 1024 + // Update maxId regardless of whether we found "new" ones, to keep paginating 1021 1025 const lastTweet = result.tweets[result.tweets.length - 1]; 1022 1026 maxId = lastTweet?.id_str || lastTweet?.id || null; 1027 + 1028 + if (limit && allFoundTweets.length >= limit) break; 1029 + 1023 1030 await new Promise((r) => setTimeout(r, 2000)); 1024 1031 } 1025 1032