Use publication date in title instead of current date

A follow up to this https://github.com/kovidgoyal/calibre/pull/1665 that implements this for the Economist.
This commit is contained in:
Tomáš Hnyk 2022-06-17 23:38:29 +02:00 committed by GitHub
parent 19e50d4fed
commit 35077c15e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -270,7 +270,8 @@ class Economist(BasicNewsRecipe):
def publication_date(self):
if edition_date:
return parse_only_date(edition_date, as_utc=False)
return BasicNewsRecipe.publication_date(self)
url = self.browser.open("https://www.economist.com/printedition").geturl()
return parse_only_date(url.split("/")[-1], as_utc=False)
def parse_index(self):
# return [('Articles', [{'title':'test',