tangled
alpha
login
or
join now
indexx.dev
/
tweets2bsky
forked from
j4ck.xyz/tweets2bsky
0
fork
atom
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.
0
fork
atom
overview
issues
pulls
pipelines
fix: allow backfill to continue paginating past processed tweets
jack
2 months ago
ec32a3f7
b2e663b3
+8
-1
1 changed file
expand all
collapse all
unified
split
src
index.ts
+8
-1
src/index.ts
···
1016
1016
}
1017
1017
}
1018
1018
1019
1019
-
if (newOnes === 0 || (limit && allFoundTweets.length >= limit)) break;
1019
1019
+
if (newOnes === 0 && result.tweets.length > 0) {
1020
1020
+
console.log(`[${twitterUsername}] ⏩ Batch contained no new tweets. Continuing to older history...`);
1021
1021
+
updateAppStatus({ message: `Skipping seen tweets, digging deeper...` });
1022
1022
+
}
1020
1023
1024
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
1027
+
1028
1028
+
if (limit && allFoundTweets.length >= limit) break;
1029
1029
+
1023
1030
await new Promise((r) => setTimeout(r, 2000));
1024
1031
}
1025
1032