From d43e30e796a8a176428eb503f16f6bb831126eec Mon Sep 17 00:00:00 2001 From: Sophist <3001893+Sophist-UK@users.noreply.github.com> Date: Sat, 1 May 2021 23:16:08 +0100 Subject: [PATCH] Rename publication_date to edition_date ... ... because as of commit 7567ced5288ab0e9a420c9622c54a1476bc884cc on 21 December 2020, publication_date is now a method of the super object BasicNewsRecipe. --- recipes/private_eye.recipe | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/private_eye.recipe b/recipes/private_eye.recipe index e16981ac2b..695253e337 100644 --- a/recipes/private_eye.recipe +++ b/recipes/private_eye.recipe @@ -80,11 +80,11 @@ class PrivateEyeRecipe(BasicNewsRecipe): return url urls = [] - publication_date = "" + edition_date = "" def add_article(self, title, url, description="", date=None): if date is None: - date = self.publication_date + date = self.edition_date if url and url not in self.urls: self.urls.append(url) self.log.info( @@ -139,9 +139,9 @@ class PrivateEyeRecipe(BasicNewsRecipe): date = datetime.strptime( " ".join((day, month, year)), "%d %B %Y") date = date - timedelta(11) - self.publication_date = datetime.strftime( + self.edition_date = datetime.strftime( date, "%d %B %Y").lstrip("0") - self.log.debug("Publication date: %s" % self.publication_date) + self.log.debug("Publication date: %s" % self.edition_date) self.title_with_date = self.title + datetime.strftime( date, " %Y-%m-%d") break