[+] Add news channels to sample

This commit is contained in:
Hykilpikonna
2021-11-24 11:19:59 -05:00
parent dfe4410e2b
commit 4e84de3fca
2 changed files with 7 additions and 5 deletions
+4 -3
View File
@@ -102,6 +102,7 @@ class Sample:
"""
most_popular: list[ProcessedUser]
random: list[ProcessedUser]
english_news: list[str]
def select_user_sample() -> None:
@@ -143,12 +144,12 @@ def select_user_sample() -> None:
sample = random.sample(filtered, 500)
# Save
write(file, json_stringify(Sample(most_popular, sample)))
write(file, json_stringify(Sample(most_popular, sample, get_english_news_channels())))
def get_news_channels() -> list[str]:
def get_english_news_channels() -> list[str]:
"""
Find news channels
Find news channels that post in English
Run this after download_all_tweets(api, 'TwitterNews')