From eaed84a0a625857e53ad08dc694c7a7a9a63ba0f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 15 Aug 2017 09:42:23 +0530 Subject: [PATCH] pep8 --- recipes/adventure_zone_pl.recipe | 1 - recipes/film_org_pl.recipe | 2 +- recipes/film_web.recipe | 6 +++--- recipes/parisreview.recipe | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/recipes/adventure_zone_pl.recipe b/recipes/adventure_zone_pl.recipe index 40be1482fc..ee5fd065ae 100644 --- a/recipes/adventure_zone_pl.recipe +++ b/recipes/adventure_zone_pl.recipe @@ -1,5 +1,4 @@ from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import BeautifulSoup as bs class Adventure_zone(BasicNewsRecipe): diff --git a/recipes/film_org_pl.recipe b/recipes/film_org_pl.recipe index 87928df019..cc278a8517 100644 --- a/recipes/film_org_pl.recipe +++ b/recipes/film_org_pl.recipe @@ -5,7 +5,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class FilmOrgPl(BasicNewsRecipe): title = u'Film.org.pl' __author__ = 'fenuks' - description = u"Recenzje, analizy, artykuły, rankingi - wszystko o filmie dla miłośników kina. Opisy efektów specjalnych, wersji reżyserskich, remake'ów, sequeli. No i forum filmowe. Jedne z największych w Polsce." + description = u"Recenzje, analizy, artykuły, rankingi - wszystko o filmie dla miłośników kina. Opisy efektów specjalnych, wersji reżyserskich, remake'ów, sequeli. No i forum filmowe. Jedne z największych w Polsce." # noqa category = 'film' language = 'pl' cover_url = 'http://film.org.pl/wp-content/uploads/2015/02/film.org.pl_film.org_.pl_kmfviolet4.png' diff --git a/recipes/film_web.recipe b/recipes/film_web.recipe index b7dee1c688..4b2e83d1bd 100644 --- a/recipes/film_web.recipe +++ b/recipes/film_web.recipe @@ -21,7 +21,7 @@ class FilmWebPl(BasicNewsRecipe): 'ul.inline > li {display: inline;} ' 'ul.sep-line > li + li::before {content: " | "} ' 'ul.inline {padding:0px;} .vertical-align {display: inline-block;}') - preprocess_regexps = [(re.compile(r'', re.DOTALL), lambda match: ''), # fix malformed HTML with 2 body tags... + preprocess_regexps = [(re.compile(r'', re.DOTALL), lambda match: ''), # fix malformed HTML with 2 body tags... (re.compile(u'(?:)?\(kliknij\,\ aby powiększyć\)(?:)?', re.IGNORECASE), lambda m: ''), (re.compile(ur'(
\s*?
\s*?)+', re.IGNORECASE), lambda m: '
') ] @@ -45,8 +45,8 @@ class FilmWebPl(BasicNewsRecipe): ] def preprocess_html(self, soup): - for a in soup('a'): - if a.has_key('href') and 'http://' not in a['href'] and 'https://' not in a['href']: + for a in soup('a', href=True): + if 'http://' not in a['href'] and 'https://' not in a['href']: a['href'] = self.index + a['href'] return soup diff --git a/recipes/parisreview.recipe b/recipes/parisreview.recipe index 8a370c4bbb..e670ff7a53 100644 --- a/recipes/parisreview.recipe +++ b/recipes/parisreview.recipe @@ -1,5 +1,4 @@ from calibre.web.feeds.news import BasicNewsRecipe -import re class ParisReview(BasicNewsRecipe):