twitter: prefer archive data over twidump for tweets
also add a script to check twitter data
This commit is contained in:
parent
bb4c77612b
commit
946daf40d0
3 changed files with 91 additions and 1 deletions
|
@ -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(),
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue