Fixed bug where duplicate threads would not get responded
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user