Fixed bug where duplicate threads would not get responded

This commit is contained in:
Remy Moll
2022-04-26 10:32:41 +02:00
parent 024da446e7
commit 246729d376
6 changed files with 56 additions and 41 deletions

View File

@@ -15,6 +15,7 @@ class NewspaperDummy():
title = "Error while running fetch"
summary = "Error while running fetch"
text = "Error while running fetch"
meta_lang = ""
authors = []
keywords = []
@@ -23,6 +24,7 @@ def get_description(article_object):
url = article_object.article_url
website = urlparse(url).netloc
article_object.source_name = website
try:
pub_date = datetime.datetime.strptime(find_date(url), '%Y-%d-%M')
except: # other file types
@@ -50,6 +52,11 @@ def get_description(article_object):
else:
summary = fallback.summary
try:
print(f"lang: {news_article.meta_lang}")
except:
print("could not access meta_lang")
if news_article.meta_lang:
lang = news_article.meta_lang
else: