Block reuters

This commit is contained in:
Notoric 2024-06-02 19:27:24 +01:00
parent 21949bdd2c
commit 0c86bd74ef
2 changed files with 6 additions and 2 deletions

View File

@ -125,7 +125,8 @@ def get_newsfeed(category='general'):
article_data['author'] = article['author']
article_data['category'] = category
article_data['timestamp'] = datetime.now()
articles.append(article_data)
if (article['url'].contains("reuters.com") == False):
articles.append(article_data)
print("Newsfeed data retrieved!")
return articles

5
snc.py
View File

@ -149,7 +149,10 @@ def get_newsfeed(category='general'):
article_data['author'] = article['author']
article_data['category'] = category
article_data['timestamp'] = datetime.now()
articles.append(article_data)
if (article['url'].contains("reuters.com") == False):
articles.append(article_data)
print("Newsfeed data retrieved!")
return articles