diff --git a/resources/recipes/canardpc.recipe b/resources/recipes/canardpc.recipe new file mode 100644 index 0000000000..d42790eb67 --- /dev/null +++ b/resources/recipes/canardpc.recipe @@ -0,0 +1,15 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class AdvancedUserRecipe1271446252(BasicNewsRecipe): + title = u'CanardPC' + oldest_article = 7 + max_articles_per_feed = 100 + language = 'fr' + __author__ = 'zorgluf' + + feeds = [(u'CanardPC', u'http://www.canardpc.com/feed.php')] + remove_tags_after = dict(id='auteur_news') + remove_tags_before = dict(id='fil_ariane') + no_stylesheets = True + remove_tags = [dict(name='a', attrs={'class':'news_tags'}), + dict(name='div', attrs={'id':'fil_ariane'})] diff --git a/setup/check.py b/setup/check.py index 4b5a17489d..9106ca6871 100644 --- a/setup/check.py +++ b/setup/check.py @@ -106,6 +106,7 @@ class Check(Command): if os.path.exists(wn_path): sys.path.insert(0, wn_path) self.info('\tChecking Changelog...') + os.environ['DJANGO_SETTINGS_MODULE'] = 'calibre_servers.status.settings' import whats_new whats_new.test() sys.path.remove(wn_path) diff --git a/src/calibre/ebooks/BeautifulSoup.py b/src/calibre/ebooks/BeautifulSoup.py index 949d3c1f0a..966cfea772 100644 --- a/src/calibre/ebooks/BeautifulSoup.py +++ b/src/calibre/ebooks/BeautifulSoup.py @@ -1132,7 +1132,7 @@ class BeautifulStoneSoup(Tag, SGMLParser): self.pushTag(self) def popTag(self): - tag = self.tagStack.pop() + self.tagStack.pop() # Tags with just one string-owning child get the child as a # 'string' property, so that soup.tag.string is shorthand for # soup.tag.contents[0] @@ -1727,7 +1727,7 @@ class UnicodeDammit: u = self._toUnicode(markup, proposed) self.markup = u self.originalEncoding = proposed - except Exception, e: + except Exception: #print "That didn't work!" #print e return None diff --git a/src/calibre/ebooks/pml/pmlml.py b/src/calibre/ebooks/pml/pmlml.py index 4d052dba45..560a132ce1 100644 --- a/src/calibre/ebooks/pml/pmlml.py +++ b/src/calibre/ebooks/pml/pmlml.py @@ -86,7 +86,7 @@ class PMLMLizer(object): self.toc = {} for item in oeb_book.toc: href, mid, id = item.href.partition('#') - aid = self.get_anchor_id(href, id) + self.get_anchor_id(href, id) if not self.toc.get(href, None): self.toc[href] = {} self.toc[href][id] = item.title