twitter: prefer archive data over twidump for tweets

also add a script to check twitter data
This commit is contained in:
Dima Gerasimov 2022-05-30 21:40:50 +01:00 committed by karlicoss
parent bb4c77612b
commit 946daf40d0
3 changed files with 91 additions and 1 deletions

View file

@ -35,13 +35,15 @@ def _likes_archive() -> Iterator[Res[Tweet]]:
def tweets() -> Iterator[Res[Tweet]]:
# for tweets, archive data is higher quality
yield from merge_tweets(
_tweets_twint(),
_tweets_archive(),
_tweets_twint(),
)
def likes() -> Iterator[Res[Tweet]]:
# for likes, archive data barely has anything so twint is preferred
yield from merge_tweets(
_likes_twint(),
_likes_archive(),

View file

@ -124,3 +124,5 @@ def likes() -> Iterator[Res[Tweet]]:
elif isinstance(x, _IsFavorire):
yield x.tweet
# TODO maybe should combine all public iterators into a stats()