diff --git a/recipes/20_minutos.recipe b/recipes/20_minutos.recipe index c74cae4440..b1a18efda9 100644 --- a/recipes/20_minutos.recipe +++ b/recipes/20_minutos.recipe @@ -8,6 +8,7 @@ __date__ = '31 January 2011' www.20minutos.es ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/24sata.recipe b/recipes/24sata.recipe index d91d4cf583..b68f02b25f 100644 --- a/recipes/24sata.recipe +++ b/recipes/24sata.recipe @@ -8,8 +8,9 @@ __copyright__ = '2009, Darko Miletic ' ''' import re -from calibre.web.feeds.recipes import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.recipes import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/3dnews.recipe b/recipes/3dnews.recipe index 391c9f54e1..b9f5e36e1d 100644 --- a/recipes/3dnews.recipe +++ b/recipes/3dnews.recipe @@ -1,7 +1,8 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/7x7.recipe b/recipes/7x7.recipe index 691909692a..9a25a18729 100644 --- a/recipes/7x7.recipe +++ b/recipes/7x7.recipe @@ -1,7 +1,8 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/DrawAndCook.recipe b/recipes/DrawAndCook.recipe index 2f795703a3..95a74b8cfa 100644 --- a/recipes/DrawAndCook.recipe +++ b/recipes/DrawAndCook.recipe @@ -1,7 +1,9 @@ from __future__ import print_function -from calibre.web.feeds.news import BasicNewsRecipe + import re +from calibre.web.feeds.news import BasicNewsRecipe + class DrawAndCook(BasicNewsRecipe): title = 'DrawAndCook' diff --git a/recipes/aabenraalokalavisen_dk.recipe b/recipes/aabenraalokalavisen_dk.recipe index b00edbf6c0..eef73bf34b 100644 --- a/recipes/aabenraalokalavisen_dk.recipe +++ b/recipes/aabenraalokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Aabenraa ''' diff --git a/recipes/aarhuslokalavisen_dk.recipe b/recipes/aarhuslokalavisen_dk.recipe index accee18eec..6641ab24ee 100644 --- a/recipes/aarhuslokalavisen_dk.recipe +++ b/recipes/aarhuslokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Aarhus ''' diff --git a/recipes/aarhusmidtlokalavisen_dk.recipe b/recipes/aarhusmidtlokalavisen_dk.recipe index 718ed982ff..9487bcef9f 100644 --- a/recipes/aarhusmidtlokalavisen_dk.recipe +++ b/recipes/aarhusmidtlokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Aarhus Midt ''' diff --git a/recipes/aarhusnordlokalavisen_dk.recipe b/recipes/aarhusnordlokalavisen_dk.recipe index f8fb838691..1ff7ce20b7 100644 --- a/recipes/aarhusnordlokalavisen_dk.recipe +++ b/recipes/aarhusnordlokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Aarhus Nord ''' diff --git a/recipes/aarhussydlokalavisen_dk.recipe b/recipes/aarhussydlokalavisen_dk.recipe index 7d57266d5e..9b1ed72280 100644 --- a/recipes/aarhussydlokalavisen_dk.recipe +++ b/recipes/aarhussydlokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Aarhus Syd ''' diff --git a/recipes/aarhusvestlokalavisen_dk.recipe b/recipes/aarhusvestlokalavisen_dk.recipe index c21b41179d..e51e3b5d25 100644 --- a/recipes/aarhusvestlokalavisen_dk.recipe +++ b/recipes/aarhusvestlokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Aarhus Ves ''' diff --git a/recipes/abc.recipe b/recipes/abc.recipe index 990307eaeb..c4d171605b 100644 --- a/recipes/abc.recipe +++ b/recipes/abc.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/abc_au.recipe b/recipes/abc_au.recipe index 7aeb5a521d..4f5d73bf4a 100644 --- a/recipes/abc_au.recipe +++ b/recipes/abc_au.recipe @@ -1,6 +1,6 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals __license__ = 'GPL v3' __copyright__ = '2020, Pat Stapleton ' diff --git a/recipes/acrimed.recipe b/recipes/acrimed.recipe index 17a489f8e3..da796681e4 100644 --- a/recipes/acrimed.recipe +++ b/recipes/acrimed.recipe @@ -8,6 +8,7 @@ acrimed.org ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/ad.recipe b/recipes/ad.recipe index 2b7f8eb4ad..a8f69b107d 100644 --- a/recipes/ad.recipe +++ b/recipes/ad.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/afr.recipe b/recipes/afr.recipe index d196252dfe..e91d7cd420 100644 --- a/recipes/afr.recipe +++ b/recipes/afr.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe class afr(BasicNewsRecipe): diff --git a/recipes/aif_ru.recipe b/recipes/aif_ru.recipe index bf5c7d3b5b..0e25f1a7e2 100644 --- a/recipes/aif_ru.recipe +++ b/recipes/aif_ru.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 from __future__ import unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/ainonline.recipe b/recipes/ainonline.recipe index e8401f0051..f537b3ff2a 100644 --- a/recipes/ainonline.recipe +++ b/recipes/ainonline.recipe @@ -2,10 +2,12 @@ # vim:fileencoding=utf-8 # License: GPLv3 Copyright: 2019, Jose Ortiz -from __future__ import (unicode_literals, division, absolute_import, print_function) -from calibre.web.feeds.recipes import BasicNewsRecipe +from __future__ import absolute_import, division, print_function, unicode_literals + from pprint import pformat +from calibre.web.feeds.recipes import BasicNewsRecipe + INDEX = 'https://www.ainonline.com/' diff --git a/recipes/ajc.recipe b/recipes/ajc.recipe index 912d63ba03..19daa6c01f 100644 --- a/recipes/ajc.recipe +++ b/recipes/ajc.recipe @@ -8,8 +8,9 @@ __docformat__ = 'restructuredtext en' import datetime import re -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/aktualne.cz.recipe b/recipes/aktualne.cz.recipe index 833f044da2..ed1d647b8b 100644 --- a/recipes/aktualne.cz.recipe +++ b/recipes/aktualne.cz.recipe @@ -1,8 +1,10 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals -from calibre.web.feeds.recipes import BasicNewsRecipe + import re +from calibre.web.feeds.recipes import BasicNewsRecipe + class aktualneRecipe(BasicNewsRecipe): __author__ = 'bubak' diff --git a/recipes/al_monitor.recipe b/recipes/al_monitor.recipe index f0afa93e95..9c3f214b6b 100644 --- a/recipes/al_monitor.recipe +++ b/recipes/al_monitor.recipe @@ -1,17 +1,19 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals + __license__ = 'GPL v3' __copyright__ = '2014, spswerling' ''' http://www.al-monitor.com/ ''' -import string -import inspect import datetime +import inspect import re -from calibre.web.feeds.news import BasicNewsRecipe +import string + from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.news import BasicNewsRecipe class AlMonitor(BasicNewsRecipe): diff --git a/recipes/ald.recipe b/recipes/ald.recipe index eea2457118..22e1660b1c 100644 --- a/recipes/ald.recipe +++ b/recipes/ald.recipe @@ -1,16 +1,19 @@ #!/usr/bin/env python -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + __license__ = 'GPL v3' __copyright__ = '2018, PJ Paul' ''' Recipe for Arts and Letters Daily website ''' -from calibre.web.feeds.news import BasicNewsRecipe import re -from datetime import date as dt, timedelta +from datetime import date as dt +from datetime import timedelta from itertools import compress + from calibre.utils.date import parse_date +from calibre.web.feeds.news import BasicNewsRecipe class ALD(BasicNewsRecipe): diff --git a/recipes/alejakomiksu_com.recipe b/recipes/alejakomiksu_com.recipe index e03ee25db9..2f22bbffaf 100644 --- a/recipes/alejakomiksu_com.recipe +++ b/recipes/alejakomiksu_com.recipe @@ -1,5 +1,6 @@ __license__ = 'GPL v3' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/alleroedlokalavisen_dk.recipe b/recipes/alleroedlokalavisen_dk.recipe index 56a53f8fa6..be6cbc9aba 100644 --- a/recipes/alleroedlokalavisen_dk.recipe +++ b/recipes/alleroedlokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Allerød Nyt: RSS feed: Seneste nyt - alleroed.lokalavisen.dk ''' diff --git a/recipes/altomdata_dk.recipe b/recipes/altomdata_dk.recipe index bc72ebda56..c0e76b1fdd 100644 --- a/recipes/altomdata_dk.recipe +++ b/recipes/altomdata_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Alt om DATA, Datatid TechLife - Download, test, antivirus, netværk ''' diff --git a/recipes/am730.recipe b/recipes/am730.recipe index 3885a9f585..38d4a5ea9b 100644 --- a/recipes/am730.recipe +++ b/recipes/am730.recipe @@ -1,6 +1,6 @@ # vim:fileencoding=UTF-8 -from __future__ import unicode_literals -from __future__ import print_function +from __future__ import print_function, unicode_literals + __license__ = 'GPL v3' __copyright__ = '2013, Eddie Lau' __Date__ = '' diff --git a/recipes/amagerbladet_dk.recipe b/recipes/amagerbladet_dk.recipe index 30bce071f3..7454b14292 100644 --- a/recipes/amagerbladet_dk.recipe +++ b/recipes/amagerbladet_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Amagerbladet ''' diff --git a/recipes/american_thinker.recipe b/recipes/american_thinker.recipe index 2917f2f322..8e68e7fde6 100644 --- a/recipes/american_thinker.recipe +++ b/recipes/american_thinker.recipe @@ -4,8 +4,8 @@ __copyright__ = '2010, Walt Anthony ' www.americanthinker.com ''' import html5lib -from calibre.web.feeds.news import BasicNewsRecipe from calibre.utils.cleantext import clean_xml_chars +from calibre.web.feeds.news import BasicNewsRecipe from lxml import etree diff --git a/recipes/andhrajyothy_ap.recipe b/recipes/andhrajyothy_ap.recipe index 3e7834098c..041098c8ca 100644 --- a/recipes/andhrajyothy_ap.recipe +++ b/recipes/andhrajyothy_ap.recipe @@ -1,7 +1,8 @@ -from calibre.web.feeds.news import BasicNewsRecipe import json -from datetime import date from collections import defaultdict +from datetime import date + +from calibre.web.feeds.news import BasicNewsRecipe # figure out your local edition id from the log of this recipe edi_id = 182 # NTR VIJAYAWADA - 182 diff --git a/recipes/andhrajyothy_tel.recipe b/recipes/andhrajyothy_tel.recipe index f3e9543a26..37cba5ebfb 100644 --- a/recipes/andhrajyothy_tel.recipe +++ b/recipes/andhrajyothy_tel.recipe @@ -1,7 +1,8 @@ -from calibre.web.feeds.news import BasicNewsRecipe import json -from datetime import date from collections import defaultdict +from datetime import date + +from calibre.web.feeds.news import BasicNewsRecipe # figure out your local edition id from the log of this recipe edi_id = 34 # HYDERABAD MAIN I - 34 diff --git a/recipes/android_com_pl.recipe b/recipes/android_com_pl.recipe index 39eeb39582..c62f1ceef4 100644 --- a/recipes/android_com_pl.recipe +++ b/recipes/android_com_pl.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/animal_politico.recipe b/recipes/animal_politico.recipe index 9dff426c94..5d23429f2a 100644 --- a/recipes/animal_politico.recipe +++ b/recipes/animal_politico.recipe @@ -2,6 +2,7 @@ # encoding: utf-8 import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/anthony_muroni.recipe b/recipes/anthony_muroni.recipe index 4f2ac1c9e8..8d8f44e023 100644 --- a/recipes/anthony_muroni.recipe +++ b/recipes/anthony_muroni.recipe @@ -1,7 +1,6 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import (absolute_import, division, print_function, - unicode_literals) +from __future__ import absolute_import, division, print_function, unicode_literals from calibre.web.feeds.news import AutomaticNewsRecipe diff --git a/recipes/ap.recipe b/recipes/ap.recipe index 2bfa2d0015..311b7b1494 100644 --- a/recipes/ap.recipe +++ b/recipes/ap.recipe @@ -4,8 +4,8 @@ import json +from calibre.utils.date import parse_date, utcnow from calibre.web.feeds.news import BasicNewsRecipe, classes -from calibre.utils.date import utcnow, parse_date class AssociatedPress(BasicNewsRecipe): diff --git a/recipes/appledaily_tw.recipe b/recipes/appledaily_tw.recipe index 07667bee85..99eb8b59ec 100644 --- a/recipes/appledaily_tw.recipe +++ b/recipes/appledaily_tw.recipe @@ -1,10 +1,12 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function -from calibre.web.feeds.news import BasicNewsRecipe +from __future__ import absolute_import, division, print_function, unicode_literals + import re +from calibre.web.feeds.news import BasicNewsRecipe + __license__ = 'GPL v3' __author__ = 'YuLun Shih' diff --git a/recipes/aprospect.recipe b/recipes/aprospect.recipe index 932125d98b..d6f694e0e1 100644 --- a/recipes/aprospect.recipe +++ b/recipes/aprospect.recipe @@ -2,6 +2,7 @@ # License: GPLv3 Copyright: 2008, Kovid Goyal from __future__ import unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe, classes diff --git a/recipes/arcadia.recipe b/recipes/arcadia.recipe index 72fdae35dd..53f4b7513e 100644 --- a/recipes/arcadia.recipe +++ b/recipes/arcadia.recipe @@ -1,8 +1,9 @@ # -*- coding: utf8 -*- -from calibre.web.feeds.recipes import BasicNewsRecipe import re +from calibre.web.feeds.recipes import BasicNewsRecipe + class Arcadia_BBS(BasicNewsRecipe): title = u'Arcadia' diff --git a/recipes/arcamax.recipe b/recipes/arcamax.recipe index ab9d218e63..ab4ae575cf 100644 --- a/recipes/arcamax.recipe +++ b/recipes/arcamax.recipe @@ -7,8 +7,9 @@ www.arcamax.com ''' import os -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ptempfile import PersistentTemporaryDirectory +from calibre.web.feeds.news import BasicNewsRecipe class Arcamax(BasicNewsRecipe): diff --git a/recipes/ars_technica.recipe b/recipes/ars_technica.recipe index 802e0e8519..1c614595fc 100644 --- a/recipes/ars_technica.recipe +++ b/recipes/ars_technica.recipe @@ -5,6 +5,7 @@ arstechnica.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/atlantic.recipe b/recipes/atlantic.recipe index 13e55686b8..9e90dcce68 100644 --- a/recipes/atlantic.recipe +++ b/recipes/atlantic.recipe @@ -4,7 +4,8 @@ import json from xml.sax.saxutils import escape, quoteattr -from calibre.web.feeds.news import BasicNewsRecipe, prefixed_classes as prefix_classes, classes +from calibre.web.feeds.news import BasicNewsRecipe, classes +from calibre.web.feeds.news import prefixed_classes as prefix_classes web_version = False test_article = None diff --git a/recipes/atlantic_com.recipe b/recipes/atlantic_com.recipe index 4256aebf44..f8a96645bc 100644 --- a/recipes/atlantic_com.recipe +++ b/recipes/atlantic_com.recipe @@ -4,7 +4,8 @@ import json from xml.sax.saxutils import escape, quoteattr -from calibre.web.feeds.news import BasicNewsRecipe, prefixed_classes as prefix_classes, classes +from calibre.web.feeds.news import BasicNewsRecipe, classes +from calibre.web.feeds.news import prefixed_classes as prefix_classes web_version = True test_article = None diff --git a/recipes/attac_es.recipe b/recipes/attac_es.recipe index 9e0d11f438..6b91dece96 100644 --- a/recipes/attac_es.recipe +++ b/recipes/attac_es.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/auto_prove.recipe b/recipes/auto_prove.recipe index de880c020a..ef0334dec0 100644 --- a/recipes/auto_prove.recipe +++ b/recipes/auto_prove.recipe @@ -1,5 +1,6 @@ #!/usr/bin/env python from __future__ import print_function + __license__ = 'GPL v3' __author__ = 'GabrieleMarini, based on Darko Miletic' __copyright__ = '2009, Darko Miletic , Gabriele Marini' diff --git a/recipes/automatiseringgids.recipe b/recipes/automatiseringgids.recipe index 4f429e1e9b..a5e6b916b4 100644 --- a/recipes/automatiseringgids.recipe +++ b/recipes/automatiseringgids.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/avisen_dk.recipe b/recipes/avisen_dk.recipe index 12083eec35..15d8033f24 100644 --- a/recipes/avisen_dk.recipe +++ b/recipes/avisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Avisen.dk ''' diff --git a/recipes/b92.recipe b/recipes/b92.recipe index 0cd0f76257..02e7a2bfee 100644 --- a/recipes/b92.recipe +++ b/recipes/b92.recipe @@ -5,6 +5,7 @@ __copyright__ = '2008-2012, Darko Miletic ' b92.net ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/badania_net.recipe b/recipes/badania_net.recipe index 892282d8f5..dd25217493 100644 --- a/recipes/badania_net.recipe +++ b/recipes/badania_net.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class BadaniaNet(BasicNewsRecipe): title = u'badania.net' diff --git a/recipes/balkaninsight.recipe b/recipes/balkaninsight.recipe index fab28069a9..17ba11cbac 100644 --- a/recipes/balkaninsight.recipe +++ b/recipes/balkaninsight.recipe @@ -5,6 +5,7 @@ balkaninsight.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/baltimore_sun.recipe b/recipes/baltimore_sun.recipe index 25bb584754..796a5655ac 100644 --- a/recipes/baltimore_sun.recipe +++ b/recipes/baltimore_sun.recipe @@ -1,4 +1,5 @@ from __future__ import with_statement + __license__ = 'GPL 3' __copyright__ = '2009, Kovid Goyal ' __copyright__ = '2012 Josh Hall' diff --git a/recipes/bar_and_bench.recipe b/recipes/bar_and_bench.recipe index 9d9a11ab84..d54fb41ede 100644 --- a/recipes/bar_and_bench.recipe +++ b/recipes/bar_and_bench.recipe @@ -1,5 +1,6 @@ -from calibre.web.feeds.news import BasicNewsRecipe, prefixed_classes from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe, prefixed_classes + class bar(BasicNewsRecipe): title = 'Bar and Bench' diff --git a/recipes/barrons.recipe b/recipes/barrons.recipe index 923e66d6e5..0a5d08e7f5 100644 --- a/recipes/barrons.recipe +++ b/recipes/barrons.recipe @@ -1,7 +1,9 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes, prefixed_classes +import re from collections import defaultdict from datetime import date -import re + +from calibre.web.feeds.news import BasicNewsRecipe, classes, prefixed_classes + class barrons(BasicNewsRecipe): title = 'Barron\'s Magazine' diff --git a/recipes/bbc_sport.recipe b/recipes/bbc_sport.recipe index 16477b6a6b..62d16ef337 100644 --- a/recipes/bbc_sport.recipe +++ b/recipes/bbc_sport.recipe @@ -4,6 +4,7 @@ __copyright__ = '2010, limawhiskey ' news.bbc.co.uk/sport/ ''' import re + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/benchmark_pl.recipe b/recipes/benchmark_pl.recipe index 83b1b465c9..3b588b72dd 100644 --- a/recipes/benchmark_pl.recipe +++ b/recipes/benchmark_pl.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re + from calibre.ebooks.BeautifulSoup import Comment +from calibre.web.feeds.news import BasicNewsRecipe class BenchmarkPl(BasicNewsRecipe): diff --git a/recipes/berfreunde_blog.recipe b/recipes/berfreunde_blog.recipe index ebbe0b5be5..d4d297fcd6 100644 --- a/recipes/berfreunde_blog.recipe +++ b/recipes/berfreunde_blog.recipe @@ -2,6 +2,7 @@ # vim:fileencoding=utf-8 from calibre.web.feeds.news import BasicNewsRecipe + class bergfreunde_blog(BasicNewsRecipe): # under permission an knowledge from Bergfreunde.de # thanks guys for that! diff --git a/recipes/berliner_zeitung.recipe b/recipes/berliner_zeitung.recipe index d0d5bfb4df..cda1568514 100644 --- a/recipes/berliner_zeitung.recipe +++ b/recipes/berliner_zeitung.recipe @@ -3,6 +3,7 @@ # License: GPLv3 Copyright: 2016, Kovid Goyal from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/big_oven.recipe b/recipes/big_oven.recipe index cc0ebdb543..e8f1a3fd72 100644 --- a/recipes/big_oven.recipe +++ b/recipes/big_oven.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class BigOven(BasicNewsRecipe): title = 'BigOven' diff --git a/recipes/bild_de.recipe b/recipes/bild_de.recipe index 8f41aa0b5d..a4150f80fc 100644 --- a/recipes/bild_de.recipe +++ b/recipes/bild_de.recipe @@ -1,12 +1,13 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals ''' bild.de ''' import re + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/birmingham_evening_mail.recipe b/recipes/birmingham_evening_mail.recipe index 98d4fb38cf..8217f13d73 100644 --- a/recipes/birmingham_evening_mail.recipe +++ b/recipes/birmingham_evening_mail.recipe @@ -1,7 +1,8 @@ -from calibre.web.feeds.news import BasicNewsRecipe -from calibre import browser import re +from calibre import browser +from calibre.web.feeds.news import BasicNewsRecipe + class AdvancedUserRecipe1306097511(BasicNewsRecipe): title = u'Birmingham Evening Mail' diff --git a/recipes/birmingham_post.recipe b/recipes/birmingham_post.recipe index 4ccf2d23c7..e87b215def 100644 --- a/recipes/birmingham_post.recipe +++ b/recipes/birmingham_post.recipe @@ -1,7 +1,9 @@ from __future__ import print_function -from calibre.web.feeds.news import BasicNewsRecipe + import re + import mechanize +from calibre.web.feeds.news import BasicNewsRecipe class AdvancedUserRecipe1306097511(BasicNewsRecipe): diff --git a/recipes/blesk.recipe b/recipes/blesk.recipe index 1e2279ae5e..8757bf4dcf 100644 --- a/recipes/blesk.recipe +++ b/recipes/blesk.recipe @@ -1,8 +1,10 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals -from calibre.web.feeds.recipes import BasicNewsRecipe + import re +from calibre.web.feeds.recipes import BasicNewsRecipe + class bleskRecipe(BasicNewsRecipe): __author__ = 'bubak' diff --git a/recipes/blic.recipe b/recipes/blic.recipe index 281fea0ee0..7368ec530e 100644 --- a/recipes/blic.recipe +++ b/recipes/blic.recipe @@ -6,6 +6,7 @@ blic.rs ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/bloomberg-business-week.recipe b/recipes/bloomberg-business-week.recipe index 297a107792..b4a7fefca1 100644 --- a/recipes/bloomberg-business-week.recipe +++ b/recipes/bloomberg-business-week.recipe @@ -1,9 +1,11 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes -from html5_parser import parse import json import random import time +from calibre.web.feeds.news import BasicNewsRecipe, classes +from html5_parser import parse + + def get_contents(x): if x == '': return '' diff --git a/recipes/bloomberg.recipe b/recipes/bloomberg.recipe index e525d3cbb4..51c2eeaa78 100644 --- a/recipes/bloomberg.recipe +++ b/recipes/bloomberg.recipe @@ -1,10 +1,12 @@ -from calibre.web.feeds.news import BasicNewsRecipe -from html5_parser import parse -from calibre.ptempfile import PersistentTemporaryFile import json import random import time +from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe +from html5_parser import parse + + def get_contents(x): if x == '': return '' diff --git a/recipes/borsen_dk.recipe b/recipes/borsen_dk.recipe index 4ea08e3d72..3a4e47f345 100644 --- a/recipes/borsen_dk.recipe +++ b/recipes/borsen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Børsen.dk ''' diff --git a/recipes/boston.com.recipe b/recipes/boston.com.recipe index 5291a54d3e..316969243a 100644 --- a/recipes/boston.com.recipe +++ b/recipes/boston.com.recipe @@ -3,15 +3,15 @@ # License: GPLv3 Copyright: 2016, Kovid Goyal from __future__ import absolute_import, division, print_function, unicode_literals + import json import pprint from datetime import timedelta + from calibre.utils.date import utcnow from calibre.utils.iso8601 import parse_iso8601 - from calibre.web.feeds.recipes import BasicNewsRecipe - oldest_article = 1 # days, includes articles that were published no more than the specified number of days ago diff --git a/recipes/boston_globe_print_edition.recipe b/recipes/boston_globe_print_edition.recipe index a311f2b781..3ceb4edbb0 100644 --- a/recipes/boston_globe_print_edition.recipe +++ b/recipes/boston_globe_print_edition.recipe @@ -1,10 +1,12 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # License: GPLv3 Copyright: 2016, Kovid Goyal -from calibre.web.feeds.news import BasicNewsRecipe, classes from collections import defaultdict from datetime import date +from calibre.web.feeds.news import BasicNewsRecipe, classes + + def class_as_string(x): if isinstance(x, (list, tuple)): x = ' '.join(x) diff --git a/recipes/boxis.recipe b/recipes/boxis.recipe index 70bec6af12..5cd1e1db56 100644 --- a/recipes/boxis.recipe +++ b/recipes/boxis.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import AutomaticNewsRecipe diff --git a/recipes/brand_eins.recipe b/recipes/brand_eins.recipe index ffdd454a65..f4659ce1b2 100644 --- a/recipes/brand_eins.recipe +++ b/recipes/brand_eins.recipe @@ -8,9 +8,10 @@ __version__ = '0.2' ''' brand eins.de ''' -from calibre.web.feeds.news import BasicNewsRecipe from collections import OrderedDict +from calibre.web.feeds.news import BasicNewsRecipe + class BrandEins(BasicNewsRecipe): diff --git a/recipes/breaking_mad.recipe b/recipes/breaking_mad.recipe index b1c279d452..e0b0574b65 100644 --- a/recipes/breaking_mad.recipe +++ b/recipes/breaking_mad.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/brecha.recipe b/recipes/brecha.recipe index 59c438283b..0986017c79 100644 --- a/recipes/brecha.recipe +++ b/recipes/brecha.recipe @@ -1,4 +1,5 @@ from __future__ import absolute_import, division, print_function, unicode_literals + __license__ = 'GPL v3' __copyright__ = '2012, Darko Miletic ' ''' @@ -6,9 +7,9 @@ www.brecha.com.uy ''' try: - from urllib.parse import urlencode, quote + from urllib.parse import quote, urlencode except ImportError: - from urllib import urlencode, quote + from urllib import quote, urlencode from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/brewiarz.recipe b/recipes/brewiarz.recipe index be48df4133..ada68ebd17 100644 --- a/recipes/brewiarz.recipe +++ b/recipes/brewiarz.recipe @@ -1,12 +1,14 @@ #!/usr/bin/env python from __future__ import print_function + __license__ = 'GPL v3' -from calibre.web.feeds.news import BasicNewsRecipe import datetime import re +from calibre.web.feeds.news import BasicNewsRecipe + class brewiarz(BasicNewsRecipe): title = u'Brewiarz' diff --git a/recipes/bt_dk.recipe b/recipes/bt_dk.recipe index 01bbfdfb88..9540127999 100644 --- a/recipes/bt_dk.recipe +++ b/recipes/bt_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' BT Nyheder ''' diff --git a/recipes/buckmasters.recipe b/recipes/buckmasters.recipe index ef198c0556..b46d1cd154 100644 --- a/recipes/buckmasters.recipe +++ b/recipes/buckmasters.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/business_standard.recipe b/recipes/business_standard.recipe index 25af5a8b32..8e59d3673b 100644 --- a/recipes/business_standard.recipe +++ b/recipes/business_standard.recipe @@ -1,8 +1,10 @@ -from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ptempfile import PersistentTemporaryFile -from html5_parser import parse -from datetime import datetime import json +from datetime import datetime + +from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe +from html5_parser import parse + class BusinessStandard(BasicNewsRecipe): title = 'Business Standard' diff --git a/recipes/business_standard_print.recipe b/recipes/business_standard_print.recipe index d648ce042f..b7c772e0d9 100644 --- a/recipes/business_standard_print.recipe +++ b/recipes/business_standard_print.recipe @@ -1,7 +1,8 @@ +import json +from datetime import datetime + from calibre.web.feeds.news import BasicNewsRecipe from html5_parser import parse -from datetime import datetime -import json today = datetime.today().strftime('%d-%m-%Y') diff --git a/recipes/calcalist.recipe b/recipes/calcalist.recipe index 4f888b0bd9..d794946412 100644 --- a/recipes/calcalist.recipe +++ b/recipes/calcalist.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class AdvancedUserRecipe1283848012(BasicNewsRecipe): description = 'This is a recipe of Calcalist.co.il' diff --git a/recipes/calgary_herald.recipe b/recipes/calgary_herald.recipe index 9d23e2dcab..5ab1c722fa 100644 --- a/recipes/calgary_herald.recipe +++ b/recipes/calgary_herald.recipe @@ -1,14 +1,16 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function + __license__ = 'GPL v3' ''' www.canada.com ''' import re -from calibre.web.feeds.recipes import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.recipes import BasicNewsRecipe def new_tag(soup, name, attrs=()): @@ -142,7 +144,7 @@ class CanWestPaper(BasicNewsRecipe): dict(name='li', attrs={'class': 'print'}), dict(name='li', attrs={'class': 'share'}), dict(name='ul', attrs={'class': 'bullet'})] def get_cover_url(self): - from datetime import timedelta, date + from datetime import date, timedelta cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg' + \ str(date.today().day) + '/lg/' + self.fp_tag + '.jpg' br = BasicNewsRecipe.get_browser(self) diff --git a/recipes/capital_de.recipe b/recipes/capital_de.recipe index 0bb675953c..28c758efe1 100644 --- a/recipes/capital_de.recipe +++ b/recipes/capital_de.recipe @@ -1,12 +1,13 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals ''' capital.de ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/caravan_magazine.recipe b/recipes/caravan_magazine.recipe index 3ed3135d33..e418628d7b 100644 --- a/recipes/caravan_magazine.recipe +++ b/recipes/caravan_magazine.recipe @@ -4,10 +4,9 @@ import json -from mechanize import Request - -from calibre.web.feeds.recipes import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.recipes import BasicNewsRecipe +from mechanize import Request def classes(classes): diff --git a/recipes/caravan_magazine_hindi.recipe b/recipes/caravan_magazine_hindi.recipe index 5bebd89e60..e6a3326811 100644 --- a/recipes/caravan_magazine_hindi.recipe +++ b/recipes/caravan_magazine_hindi.recipe @@ -4,9 +4,8 @@ import json -from mechanize import Request - from calibre.web.feeds.recipes import BasicNewsRecipe +from mechanize import Request def classes(classes): diff --git a/recipes/carta.recipe b/recipes/carta.recipe index e2f9679091..f8c2349b47 100644 --- a/recipes/carta.recipe +++ b/recipes/carta.recipe @@ -1,7 +1,9 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal ' diff --git a/recipes/cato.recipe b/recipes/cato.recipe index e4d8bdb743..b83c89dedc 100644 --- a/recipes/cato.recipe +++ b/recipes/cato.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/cdrinfo_pl.recipe b/recipes/cdrinfo_pl.recipe index 9fca8ce8af..b7cf11496e 100644 --- a/recipes/cdrinfo_pl.recipe +++ b/recipes/cdrinfo_pl.recipe @@ -1,7 +1,8 @@ __license__ = 'GPL v3' import re -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Comment +from calibre.web.feeds.news import BasicNewsRecipe class cdrinfo(BasicNewsRecipe): diff --git a/recipes/ceska_pozice.recipe b/recipes/ceska_pozice.recipe index 6ad5c3db7e..e55c1e50e5 100644 --- a/recipes/ceska_pozice.recipe +++ b/recipes/ceska_pozice.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/ceske_noviny.recipe b/recipes/ceske_noviny.recipe index 633e80f6a4..4b03256dca 100644 --- a/recipes/ceske_noviny.recipe +++ b/recipes/ceske_noviny.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/cesky_rozhlas_6.recipe b/recipes/cesky_rozhlas_6.recipe index 2fbac5a3f4..e9975d801c 100644 --- a/recipes/cesky_rozhlas_6.recipe +++ b/recipes/cesky_rozhlas_6.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/cetnixploitation.recipe b/recipes/cetnixploitation.recipe index 2e561ebcd3..c6f1dd2706 100644 --- a/recipes/cetnixploitation.recipe +++ b/recipes/cetnixploitation.recipe @@ -6,6 +6,7 @@ chetnixploitation.blogspot.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/cgm_pl.recipe b/recipes/cgm_pl.recipe index d07ed2c870..ce529b661b 100644 --- a/recipes/cgm_pl.recipe +++ b/recipes/cgm_pl.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.news import BasicNewsRecipe class CGM(BasicNewsRecipe): diff --git a/recipes/champion.recipe b/recipes/champion.recipe index c59640a3ad..e94e40d3de 100644 --- a/recipes/champion.recipe +++ b/recipes/champion.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/chicago_tribune.recipe b/recipes/chicago_tribune.recipe index 1fc2f9ca36..d60399590b 100644 --- a/recipes/chicago_tribune.recipe +++ b/recipes/chicago_tribune.recipe @@ -1,4 +1,5 @@ from __future__ import with_statement + __license__ = 'GPL 3' __copyright__ = '2009, Kovid Goyal ' __docformat__ = 'restructuredtext en' diff --git a/recipes/chr_mon.recipe b/recipes/chr_mon.recipe index 3ffa429b9a..650c699fad 100644 --- a/recipes/chr_mon.recipe +++ b/recipes/chr_mon.recipe @@ -5,6 +5,7 @@ www.csmonitor.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/chronicle_higher_ed.recipe b/recipes/chronicle_higher_ed.recipe index 566c0bdbd7..619dbb287c 100644 --- a/recipes/chronicle_higher_ed.recipe +++ b/recipes/chronicle_higher_ed.recipe @@ -1,7 +1,8 @@ import re -from calibre.web.feeds.recipes import BasicNewsRecipe from collections import OrderedDict +from calibre.web.feeds.recipes import BasicNewsRecipe + class Chronicle(BasicNewsRecipe): diff --git a/recipes/cio.recipe b/recipes/cio.recipe index c310f1bae7..99dc6c1d7a 100644 --- a/recipes/cio.recipe +++ b/recipes/cio.recipe @@ -10,8 +10,8 @@ __description__ = 'CIO is the leading information brand for today s busy chief i http://www.cio.co.uk/ ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe class cio(BasicNewsRecipe): diff --git a/recipes/cio_magazine.recipe b/recipes/cio_magazine.recipe index 6323663684..813e3445cb 100644 --- a/recipes/cio_magazine.recipe +++ b/recipes/cio_magazine.recipe @@ -1,15 +1,20 @@ from __future__ import print_function + +import re + +# Para convertir el tiempo del articulo +import string + +# sys no hace falta... lo intente usar para escribir en stderr +from calibre import strftime + # Los primeros comentarios son las dificultades que he tenido con el Piton # Cuando da error UTF8 revisa los comentarios (acentos). En notepad++ Search, Goto, posicion y lo ves. # Editar con Notepad++ Si pone - donde no debe es que ha indentado mal... Edit - Blank operations - tab to space # He entendido lo que significa el from... son paths dentro de pylib.zip... # Con from importa solo un simbolo...con import,la libreria completa from calibre.web.feeds.news import BasicNewsRecipe -# sys no hace falta... lo intente usar para escribir en stderr -from calibre import strftime -# Para convertir el tiempo del articulo -import string -import re + # Para usar expresiones regulares # Visto en pylib.zip... la primera letra es mayuscula # Estas dos ultimas han sido un vago intento de establecer una cookie (no diff --git a/recipes/cityavisen_dk.recipe b/recipes/cityavisen_dk.recipe index efb0f7159f..c9f493ad86 100644 --- a/recipes/cityavisen_dk.recipe +++ b/recipes/cityavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' City Avisen ''' diff --git a/recipes/clarin.recipe b/recipes/clarin.recipe index 94e64cd0b2..5e40f395f6 100644 --- a/recipes/clarin.recipe +++ b/recipes/clarin.recipe @@ -3,6 +3,7 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals + __license__ = 'GPL v3' __copyright__ = '2008-2016, Darko Miletic ' ''' diff --git a/recipes/climate_progress.recipe b/recipes/climate_progress.recipe index f8c8467927..e7ecd93e67 100644 --- a/recipes/climate_progress.recipe +++ b/recipes/climate_progress.recipe @@ -6,8 +6,8 @@ __copyright__ = '2009, Darko Miletic ' climateprogress.org ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/cnetjapan.recipe b/recipes/cnetjapan.recipe index 20d12fa56d..e1e4d79827 100644 --- a/recipes/cnetjapan.recipe +++ b/recipes/cnetjapan.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/cnetjapan_digital.recipe b/recipes/cnetjapan_digital.recipe index 8a92d83369..9cb2a148b4 100644 --- a/recipes/cnetjapan_digital.recipe +++ b/recipes/cnetjapan_digital.recipe @@ -1,5 +1,7 @@ from __future__ import unicode_literals + import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/cnetjapan_release.recipe b/recipes/cnetjapan_release.recipe index 200749ed4e..4b85d24b9b 100644 --- a/recipes/cnetjapan_release.recipe +++ b/recipes/cnetjapan_release.recipe @@ -1,5 +1,7 @@ from __future__ import unicode_literals + import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/common_dreams.recipe b/recipes/common_dreams.recipe index f212d72519..37f1c9fc4d 100644 --- a/recipes/common_dreams.recipe +++ b/recipes/common_dreams.recipe @@ -13,6 +13,7 @@ commondreams.org ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/computerworld_dk.recipe b/recipes/computerworld_dk.recipe index db22250a54..d34ebac609 100644 --- a/recipes/computerworld_dk.recipe +++ b/recipes/computerworld_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Computerworld.dk ''' diff --git a/recipes/computerworld_pl.recipe b/recipes/computerworld_pl.recipe index 0d7db5fbd8..256326967c 100644 --- a/recipes/computerworld_pl.recipe +++ b/recipes/computerworld_pl.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/consortium_news.recipe b/recipes/consortium_news.recipe index c32090a1b2..9c861dd238 100644 --- a/recipes/consortium_news.recipe +++ b/recipes/consortium_news.recipe @@ -11,6 +11,7 @@ __license__ = 'GNU General Public License v3 - http://www.gnu.org/copyleft/gpl.h consortiumnews.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/corriere_della_sera_it.recipe b/recipes/corriere_della_sera_it.recipe index 2483bdaba6..17a15911fc 100644 --- a/recipes/corriere_della_sera_it.recipe +++ b/recipes/corriere_della_sera_it.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe __author__ = 'Ruben Scopacasa' diff --git a/recipes/cosmopolitan_uk.recipe b/recipes/cosmopolitan_uk.recipe index 4c2c3f1e07..17f184c883 100644 --- a/recipes/cosmopolitan_uk.recipe +++ b/recipes/cosmopolitan_uk.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/countryfile.recipe b/recipes/countryfile.recipe index 91bb5fe3c4..8ce935d737 100644 --- a/recipes/countryfile.recipe +++ b/recipes/countryfile.recipe @@ -1,6 +1,7 @@ +import re + from calibre import browser from calibre.web.feeds.news import BasicNewsRecipe -import re class AdvancedUserRecipe1325006965(BasicNewsRecipe): diff --git a/recipes/courier_mail.recipe b/recipes/courier_mail.recipe index 1dc90d3b5f..0823fc7289 100644 --- a/recipes/courier_mail.recipe +++ b/recipes/courier_mail.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import datetime +from calibre.web.feeds.news import BasicNewsRecipe + class Politics(BasicNewsRecipe): title = u'The Courier-Mail' diff --git a/recipes/courrier.recipe b/recipes/courrier.recipe index 8012382d8e..6e562ce8b9 100644 --- a/recipes/courrier.recipe +++ b/recipes/courrier.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.news import BasicNewsRecipe class CourierPress(BasicNewsRecipe): diff --git a/recipes/courrierinternational.recipe b/recipes/courrierinternational.recipe index c2eb6f564f..510cbc2663 100644 --- a/recipes/courrierinternational.recipe +++ b/recipes/courrierinternational.recipe @@ -9,6 +9,7 @@ Courrier International ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/crikey.recipe b/recipes/crikey.recipe index 15d81f17d5..9844cbad64 100644 --- a/recipes/crikey.recipe +++ b/recipes/crikey.recipe @@ -4,6 +4,7 @@ __copyright__ = '2021, Alistair Francis alistair@alistair23.me' __docformat__ = 'restructuredtext en' from urllib.parse import urlencode + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/cvecezla.recipe b/recipes/cvecezla.recipe index 46081c8b39..25b8efbac5 100644 --- a/recipes/cvecezla.recipe +++ b/recipes/cvecezla.recipe @@ -6,6 +6,7 @@ cvecezla.wordpress.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/cynewslive.recipe b/recipes/cynewslive.recipe index 7cc41924d9..c05a35c8c0 100644 --- a/recipes/cynewslive.recipe +++ b/recipes/cynewslive.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe from datetime import datetime, timedelta +from calibre.web.feeds.news import BasicNewsRecipe + class CyNewsLiveRecipe(BasicNewsRecipe): __license__ = 'GPL v3' diff --git a/recipes/cyprus_weekly.recipe b/recipes/cyprus_weekly.recipe index 9d40cf4394..bad7d4bcd3 100644 --- a/recipes/cyprus_weekly.recipe +++ b/recipes/cyprus_weekly.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe from datetime import datetime, timedelta +from calibre.web.feeds.news import BasicNewsRecipe + class CyNewsLiveRecipe(BasicNewsRecipe): __license__ = 'GPL v3' diff --git a/recipes/dachauer_nachrichten.recipe b/recipes/dachauer_nachrichten.recipe index ca56583de8..80b6075fe0 100644 --- a/recipes/dachauer_nachrichten.recipe +++ b/recipes/dachauer_nachrichten.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/dagensmedicin_dk.recipe b/recipes/dagensmedicin_dk.recipe index 61dfedbf8d..afd164bfbf 100644 --- a/recipes/dagensmedicin_dk.recipe +++ b/recipes/dagensmedicin_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Dagens Medicin ''' diff --git a/recipes/dagenspharma_dk.recipe b/recipes/dagenspharma_dk.recipe index 3b5dd23517..dd84b1165c 100644 --- a/recipes/dagenspharma_dk.recipe +++ b/recipes/dagenspharma_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Dagens Pharma ''' diff --git a/recipes/daily_express.recipe b/recipes/daily_express.recipe index c62c5278cb..b48d931d80 100644 --- a/recipes/daily_express.recipe +++ b/recipes/daily_express.recipe @@ -1,11 +1,10 @@ # vim:fileencoding=UTF-8 -from __future__ import unicode_literals -from __future__ import print_function +from __future__ import print_function, unicode_literals import re -from calibre.web.feeds.news import BasicNewsRecipe from calibre import browser +from calibre.web.feeds.news import BasicNewsRecipe class AdvancedUserRecipe1390132023(BasicNewsRecipe): diff --git a/recipes/daily_mail.recipe b/recipes/daily_mail.recipe index 551b2ff7fe..e164f10991 100644 --- a/recipes/daily_mail.recipe +++ b/recipes/daily_mail.recipe @@ -3,6 +3,7 @@ # License: GPLv3 Copyright: 2016, Kovid Goyal from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/daily_mirror.recipe b/recipes/daily_mirror.recipe index 812824cdf9..e7436f63ec 100644 --- a/recipes/daily_mirror.recipe +++ b/recipes/daily_mirror.recipe @@ -1,7 +1,8 @@ -from calibre.web.feeds.news import BasicNewsRecipe -from calibre import browser import re +from calibre import browser +from calibre.web.feeds.news import BasicNewsRecipe + class AdvancedUserRecipe1306061239(BasicNewsRecipe): title = u'The Daily Mirror' diff --git a/recipes/danas.recipe b/recipes/danas.recipe index b44c619a9b..23cea6e0cd 100644 --- a/recipes/danas.recipe +++ b/recipes/danas.recipe @@ -7,9 +7,10 @@ __copyright__ = '2008-2018, Darko Miletic ' danas.rs ''' -from calibre.web.feeds.news import BasicNewsRecipe from datetime import date +from calibre.web.feeds.news import BasicNewsRecipe + class Danas(BasicNewsRecipe): title = 'Danas' diff --git a/recipes/data_news.recipe b/recipes/data_news.recipe index f93d9ab1b3..ec585442b7 100644 --- a/recipes/data_news.recipe +++ b/recipes/data_news.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/de_standaard.recipe b/recipes/de_standaard.recipe index e8881deec5..4bb2222672 100644 --- a/recipes/de_standaard.recipe +++ b/recipes/de_standaard.recipe @@ -1,7 +1,9 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/deccan_herald.recipe b/recipes/deccan_herald.recipe index bb8d69e3db..6f1523a820 100644 --- a/recipes/deccan_herald.recipe +++ b/recipes/deccan_herald.recipe @@ -1,6 +1,7 @@ from calibre.ptempfile import PersistentTemporaryFile from calibre.web.feeds.news import BasicNewsRecipe, classes + class herald(BasicNewsRecipe): title = 'Deccan Herald' __author__ = 'unkn0wn' diff --git a/recipes/degentenaar.recipe b/recipes/degentenaar.recipe index 75f7bde77e..13f93f778a 100644 --- a/recipes/degentenaar.recipe +++ b/recipes/degentenaar.recipe @@ -5,8 +5,8 @@ __copyright__ = '2009, Darko Miletic ' ''' www.nieuwsblad.be ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/demagog.cz.recipe b/recipes/demagog.cz.recipe index 783ab11bc4..e5d741f84a 100644 --- a/recipes/demagog.cz.recipe +++ b/recipes/demagog.cz.recipe @@ -1,8 +1,10 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals -from calibre.web.feeds.recipes import BasicNewsRecipe + import re +from calibre.web.feeds.recipes import BasicNewsRecipe + class demagogRecipe(BasicNewsRecipe): __author__ = 'bubak' diff --git a/recipes/democracy_journal.recipe b/recipes/democracy_journal.recipe index 77d891124a..96c80c946c 100644 --- a/recipes/democracy_journal.recipe +++ b/recipes/democracy_journal.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class AdvancedUserRecipe1361743898(BasicNewsRecipe): title = u'Democracy Journal' diff --git a/recipes/denik.cz.recipe b/recipes/denik.cz.recipe index 3eadda2b6b..2af252fc9a 100644 --- a/recipes/denik.cz.recipe +++ b/recipes/denik.cz.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/denik_referendum.recipe b/recipes/denik_referendum.recipe index 80e131d6a5..35fdd1248c 100644 --- a/recipes/denik_referendum.recipe +++ b/recipes/denik_referendum.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/denikn.cz.recipe b/recipes/denikn.cz.recipe index f09c7d1586..50c7b9fd3e 100644 --- a/recipes/denikn.cz.recipe +++ b/recipes/denikn.cz.recipe @@ -1,9 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -from __future__ import unicode_literals, division, absolute_import, print_function -from calibre.web.feeds.news import BasicNewsRecipe +from __future__ import absolute_import, division, print_function, unicode_literals + from datetime import datetime +from calibre.web.feeds.news import BasicNewsRecipe CZ_DAYS = ['Po', 'Út', 'St', 'Čt', 'Pá', 'So', 'Ne'] CZ_MONTHS = ['led', 'úno', 'bře', 'dub', 'kvě', 'čen', 'čec', 'srp', 'zář', 'říj', 'lis', 'pro'] diff --git a/recipes/der_standard.recipe b/recipes/der_standard.recipe index cc21722055..f1de88a9ae 100644 --- a/recipes/der_standard.recipe +++ b/recipes/der_standard.recipe @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals __license__ = 'GPL v3' __copyright__ = '2009, Gerhard Aigner ' diff --git a/recipes/deredactie.recipe b/recipes/deredactie.recipe index ada507584c..1f6a1e5316 100644 --- a/recipes/deredactie.recipe +++ b/recipes/deredactie.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/detroit_news.recipe b/recipes/detroit_news.recipe index 5a15f7a14f..ed5dece9b6 100644 --- a/recipes/detroit_news.recipe +++ b/recipes/detroit_news.recipe @@ -1,7 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe - import re +from calibre.web.feeds.news import BasicNewsRecipe + class AdvancedUserRecipe1297291961(BasicNewsRecipe): title = u'Detroit News' diff --git a/recipes/deutsche_welle_bs.recipe b/recipes/deutsche_welle_bs.recipe index 65ccd31cb9..e638560cf8 100644 --- a/recipes/deutsche_welle_bs.recipe +++ b/recipes/deutsche_welle_bs.recipe @@ -1,5 +1,6 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes + class DeutscheWelle_bs(BasicNewsRecipe): title = 'Deutsche Welle' __author__ = 'unkn0wn' diff --git a/recipes/deutsche_welle_de.recipe b/recipes/deutsche_welle_de.recipe index 4ee5bd9c67..e9a5bf1921 100644 --- a/recipes/deutsche_welle_de.recipe +++ b/recipes/deutsche_welle_de.recipe @@ -1,5 +1,6 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes + class DeutscheWelle(BasicNewsRecipe): title = 'Deutsche Welle' description = 'Nachrichten der Deutschen Welle (DW)' diff --git a/recipes/deutsche_welle_en.recipe b/recipes/deutsche_welle_en.recipe index faa02a6183..00679daea4 100644 --- a/recipes/deutsche_welle_en.recipe +++ b/recipes/deutsche_welle_en.recipe @@ -1,5 +1,6 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes + class DeutscheWelle_en(BasicNewsRecipe): title = 'Deutsche Welle' __author__ = 'unkn0wn' diff --git a/recipes/deutsche_welle_es.recipe b/recipes/deutsche_welle_es.recipe index a036b2a96b..b28c085e17 100644 --- a/recipes/deutsche_welle_es.recipe +++ b/recipes/deutsche_welle_es.recipe @@ -1,5 +1,6 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes + class DeutscheWelle_es(BasicNewsRecipe): title = 'Deutsche Welle' __author__ = 'unkn0wn' diff --git a/recipes/deutsche_welle_hr.recipe b/recipes/deutsche_welle_hr.recipe index 73264fc635..8edc24a618 100644 --- a/recipes/deutsche_welle_hr.recipe +++ b/recipes/deutsche_welle_hr.recipe @@ -1,5 +1,6 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes + class DeutscheWelle_hr(BasicNewsRecipe): title = 'Deutsche Welle' __author__ = 'unkn0wn' diff --git a/recipes/deutsche_welle_pt.recipe b/recipes/deutsche_welle_pt.recipe index aff42efd0a..afafe67a28 100644 --- a/recipes/deutsche_welle_pt.recipe +++ b/recipes/deutsche_welle_pt.recipe @@ -1,5 +1,6 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes + class DeutscheWelle_pt(BasicNewsRecipe): title = 'Deutsche Welle' __author__ = 'unkn0wn' diff --git a/recipes/deutsche_welle_sr.recipe b/recipes/deutsche_welle_sr.recipe index 7f1b1717c0..9cb2aaa482 100644 --- a/recipes/deutsche_welle_sr.recipe +++ b/recipes/deutsche_welle_sr.recipe @@ -1,5 +1,6 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes + class DeutscheWelle_sr(BasicNewsRecipe): title = 'Deutsche Welle' __author__ = 'unkn0wn' diff --git a/recipes/di.recipe b/recipes/di.recipe index bbd8172cd8..133cc9ad89 100644 --- a/recipes/di.recipe +++ b/recipes/di.recipe @@ -8,9 +8,10 @@ __version__ = 'v. 0.5' di.com.pl ''' -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class DziennikInternautowRecipe(BasicNewsRecipe): __author__ = 'Mori' diff --git a/recipes/diario_de_noticias.recipe b/recipes/diario_de_noticias.recipe index 5805ea6d82..206443f5a8 100644 --- a/recipes/diario_de_noticias.recipe +++ b/recipes/diario_de_noticias.recipe @@ -1,6 +1,7 @@ # vim:fileencoding=UTF-8 from __future__ import unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/diepresse.recipe b/recipes/diepresse.recipe index 1bafa159c4..de7d8e49fb 100644 --- a/recipes/diepresse.recipe +++ b/recipes/diepresse.recipe @@ -1,6 +1,6 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals __license__ = 'GPL v3' __copyright__ = '2009, Gerhard Aigner ' @@ -8,6 +8,7 @@ __copyright__ = '2009, Gerhard Aigner ' ''' http://www.diepresse.at - Austrian Newspaper ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/dilbert.recipe b/recipes/dilbert.recipe index 5878f7fd45..60a93d64f8 100644 --- a/recipes/dilbert.recipe +++ b/recipes/dilbert.recipe @@ -3,6 +3,7 @@ import os import tempfile + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/dilemaveche.recipe b/recipes/dilemaveche.recipe index 137b11c235..e4633c0c61 100644 --- a/recipes/dilemaveche.recipe +++ b/recipes/dilemaveche.recipe @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- from __future__ import print_function + __license__ = 'GPL v3' __copyright__ = u'2014-01-09, Silviu Cotoar\u0103, Marius Popescu' ''' diff --git a/recipes/discover_magazine_monthly.recipe b/recipes/discover_magazine_monthly.recipe index 8c1869ae42..2910de99b5 100644 --- a/recipes/discover_magazine_monthly.recipe +++ b/recipes/discover_magazine_monthly.recipe @@ -1,5 +1,6 @@ #!/usr/bin/env python from __future__ import unicode_literals + __license__ = 'GPL v3' __copyright__ = '2015 Michael Marotta ' # Written April 2015 @@ -7,8 +8,9 @@ __copyright__ = '2015 Michael Marotta ' ''' discovermagazine.com ''' -import re import json +import re + try: from http.cookiejar import Cookie except ImportError: diff --git a/recipes/distrowatch_weekly.recipe b/recipes/distrowatch_weekly.recipe index 6920fe9e73..836b8a3d01 100644 --- a/recipes/distrowatch_weekly.recipe +++ b/recipes/distrowatch_weekly.recipe @@ -4,9 +4,10 @@ __license__ = "GPL v3" """DistroWatch Weekly""" -from calibre.web.feeds.news import BasicNewsRecipe import datetime +from calibre.web.feeds.news import BasicNewsRecipe + class DistroWatchWeekly(BasicNewsRecipe): title = "DistroWatch Weekly" diff --git a/recipes/djurslandsposten_dk.recipe b/recipes/djurslandsposten_dk.recipe index 2b7f58859f..31c5b80441 100644 --- a/recipes/djurslandsposten_dk.recipe +++ b/recipes/djurslandsposten_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' DjurslandsPosten ''' diff --git a/recipes/dna.recipe b/recipes/dna.recipe index e3c3899647..a7f3657775 100644 --- a/recipes/dna.recipe +++ b/recipes/dna.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/dnevnik_cro.recipe b/recipes/dnevnik_cro.recipe index 6bb1a98159..e3bafb6c1c 100644 --- a/recipes/dnevnik_cro.recipe +++ b/recipes/dnevnik_cro.recipe @@ -8,8 +8,9 @@ dnevnik.hr ''' import re -from calibre.web.feeds.recipes import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.recipes import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/dnevnik_mk.recipe b/recipes/dnevnik_mk.recipe index 6ff0d502ab..b20ff45d26 100644 --- a/recipes/dnevnik_mk.recipe +++ b/recipes/dnevnik_mk.recipe @@ -8,11 +8,12 @@ __copyright__ = '2011, Darko Spasovski ' dnevnik.com.mk ''' -import re import datetime -from calibre.web.feeds.news import BasicNewsRecipe +import re + from calibre import browser from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.news import BasicNewsRecipe class Dnevnik(BasicNewsRecipe): diff --git a/recipes/dobanevinosti.recipe b/recipes/dobanevinosti.recipe index 90cbc5866c..58a23317b3 100644 --- a/recipes/dobanevinosti.recipe +++ b/recipes/dobanevinosti.recipe @@ -5,6 +5,7 @@ __copyright__ = '2013, Darko Miletic ' dobanevinosti.blogspot.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/dobreprogamy.recipe b/recipes/dobreprogamy.recipe index 9b24e27104..55e906e17b 100644 --- a/recipes/dobreprogamy.recipe +++ b/recipes/dobreprogamy.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class Dobreprogramy_pl(BasicNewsRecipe): title = 'Dobreprogramy.pl' diff --git a/recipes/doghousediaries.recipe b/recipes/doghousediaries.recipe index 4a6c8ca18b..c1e42179d3 100644 --- a/recipes/doghousediaries.recipe +++ b/recipes/doghousediaries.recipe @@ -6,6 +6,7 @@ Fetch DoghouseDiaries. ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/donga.recipe b/recipes/donga.recipe index d58693140b..0c55c88300 100644 --- a/recipes/donga.recipe +++ b/recipes/donga.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.recipes import BasicNewsRecipe # Comment out sections you are not interested in diff --git a/recipes/dorfener_anzeiger.recipe b/recipes/dorfener_anzeiger.recipe index 404e25368a..b93dfbbade 100644 --- a/recipes/dorfener_anzeiger.recipe +++ b/recipes/dorfener_anzeiger.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/dr_dk.recipe b/recipes/dr_dk.recipe index a9cd6e6bb6..cc3ad50025 100644 --- a/recipes/dr_dk.recipe +++ b/recipes/dr_dk.recipe @@ -4,6 +4,7 @@ from calibre.web.feeds.news import BasicNewsRecipe + class DRNyheder(BasicNewsRecipe): # Feeds are found here: https://www.dr.dk/nyheder/dr-nyheder-som-rss-feed diff --git a/recipes/drivelry.recipe b/recipes/drivelry.recipe index ea893d1dc6..0a1d403001 100644 --- a/recipes/drivelry.recipe +++ b/recipes/drivelry.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.news import BasicNewsRecipe class drivelrycom(BasicNewsRecipe): diff --git a/recipes/dunyahalleri.recipe b/recipes/dunyahalleri.recipe index 8d7df9ba4d..5ba36a2d0f 100644 --- a/recipes/dunyahalleri.recipe +++ b/recipes/dunyahalleri.recipe @@ -4,13 +4,12 @@ import locale import os import re - from shutil import copyfile from calibre import strftime from calibre.ebooks.BeautifulSoup import Tag -from calibre.web.feeds.recipes import BasicNewsRecipe from calibre.utils.resources import get_path +from calibre.web.feeds.recipes import BasicNewsRecipe from PIL import Image, ImageDraw, ImageFont __license__ = 'GPL v3' diff --git a/recipes/dunyahalleri_haftaninozeti.recipe b/recipes/dunyahalleri_haftaninozeti.recipe index ffee94b494..9cac93f596 100644 --- a/recipes/dunyahalleri_haftaninozeti.recipe +++ b/recipes/dunyahalleri_haftaninozeti.recipe @@ -4,13 +4,12 @@ import locale import os import re - +from contextlib import closing from shutil import copyfile -from contextlib import closing from calibre.ebooks.BeautifulSoup import BeautifulSoup, BeautifulStoneSoup, Tag -from calibre.web.feeds.recipes import BasicNewsRecipe from calibre.utils.resources import get_path +from calibre.web.feeds.recipes import BasicNewsRecipe from PIL import Image, ImageDraw, ImageFont __license__ = 'GPL v3' diff --git a/recipes/dvhn.recipe b/recipes/dvhn.recipe index a7ba8af72a..f578514a79 100644 --- a/recipes/dvhn.recipe +++ b/recipes/dvhn.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/dwutygodnik.recipe b/recipes/dwutygodnik.recipe index 8c93f1e5d4..574acde94d 100644 --- a/recipes/dwutygodnik.recipe +++ b/recipes/dwutygodnik.recipe @@ -5,11 +5,12 @@ __license__ = 'GPL v3' __copyright__ = u'Łukasz Grąbczewski 2011' __version__ = '2.0' -import re import os +import re + from calibre import walk -from calibre.utils.zipfile import ZipFile from calibre.ptempfile import PersistentTemporaryFile +from calibre.utils.zipfile import ZipFile from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/dzieje_pl.recipe b/recipes/dzieje_pl.recipe index 57d243bd74..e4a0305158 100644 --- a/recipes/dzieje_pl.recipe +++ b/recipes/dzieje_pl.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Comment +from calibre.web.feeds.news import BasicNewsRecipe class Dzieje(BasicNewsRecipe): diff --git a/recipes/dziennik_pl.recipe b/recipes/dziennik_pl.recipe index 80e2ec0444..aa89e55823 100644 --- a/recipes/dziennik_pl.recipe +++ b/recipes/dziennik_pl.recipe @@ -1,8 +1,9 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai -from calibre.web.feeds.news import BasicNewsRecipe import re + from calibre.ebooks.BeautifulSoup import Comment +from calibre.web.feeds.news import BasicNewsRecipe class Dziennik_pl(BasicNewsRecipe): diff --git a/recipes/dziennik_wschodni.recipe b/recipes/dziennik_wschodni.recipe index ad1cc3ef96..f091dd9551 100644 --- a/recipes/dziennik_wschodni.recipe +++ b/recipes/dziennik_wschodni.recipe @@ -1,6 +1,7 @@ import re -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Comment +from calibre.web.feeds.news import BasicNewsRecipe class DziennikWschodni(BasicNewsRecipe): diff --git a/recipes/ebeltoftlokalavisen_dk.recipe b/recipes/ebeltoftlokalavisen_dk.recipe index 32cb29326d..9623d521b6 100644 --- a/recipes/ebeltoftlokalavisen_dk.recipe +++ b/recipes/ebeltoftlokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Adresseavisen Ebeltoft ''' diff --git a/recipes/ebetrsberger_zeitung.recipe b/recipes/ebetrsberger_zeitung.recipe index 018b4dfea3..1dbb3fc250 100644 --- a/recipes/ebetrsberger_zeitung.recipe +++ b/recipes/ebetrsberger_zeitung.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/echo_dnia.recipe b/recipes/echo_dnia.recipe index 7c1805c103..d424227a97 100644 --- a/recipes/echo_dnia.recipe +++ b/recipes/echo_dnia.recipe @@ -1,6 +1,7 @@ import re -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Comment +from calibre.web.feeds.news import BasicNewsRecipe class EchoDnia(BasicNewsRecipe): diff --git a/recipes/echo_moskvy.recipe b/recipes/echo_moskvy.recipe index 866fb95d90..63f3dbacd2 100644 --- a/recipes/echo_moskvy.recipe +++ b/recipes/echo_moskvy.recipe @@ -1,6 +1,8 @@ -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + class EchoMsk(BasicNewsRecipe): title = '\u042D\u0425\u041E' __author__ = 'bugmen00t' diff --git a/recipes/ecogeek.recipe b/recipes/ecogeek.recipe index 3b453c3641..3a2a95a78d 100644 --- a/recipes/ecogeek.recipe +++ b/recipes/ecogeek.recipe @@ -7,8 +7,9 @@ EcoGeek.org ''' import os -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ptempfile import PersistentTemporaryDirectory +from calibre.web.feeds.news import BasicNewsRecipe class EcoGeek(BasicNewsRecipe): diff --git a/recipes/economia.recipe b/recipes/economia.recipe index 294e9bd452..322423ca1a 100644 --- a/recipes/economia.recipe +++ b/recipes/economia.recipe @@ -1,4 +1,5 @@ from calibre.web.feeds.news import BasicNewsRecipe + try: from urllib.parse import quote except ImportError: diff --git a/recipes/economist.recipe b/recipes/economist.recipe index cff4313a3c..e6dcd3acb8 100644 --- a/recipes/economist.recipe +++ b/recipes/economist.recipe @@ -2,14 +2,14 @@ # License: GPLv3 Copyright: 2008, Kovid Goyal import json -from html5_parser import parse -from lxml import etree from collections import defaultdict from calibre import replace_entities from calibre.ebooks.BeautifulSoup import NavigableString, Tag from calibre.utils.date import parse_only_date from calibre.web.feeds.news import BasicNewsRecipe +from html5_parser import parse +from lxml import etree # For past editions, set date to, for example, '2020-11-28' edition_date = None diff --git a/recipes/economist_espresso.recipe b/recipes/economist_espresso.recipe index 997e8fb81d..512bd7dfcf 100644 --- a/recipes/economist_espresso.recipe +++ b/recipes/economist_espresso.recipe @@ -2,8 +2,8 @@ https://www.economist.com/the-world-in-brief ''' -from calibre.web.feeds.news import BasicNewsRecipe, classes from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe, classes def new_tag(soup, name, attrs=()): diff --git a/recipes/economist_free.recipe b/recipes/economist_free.recipe index cff4313a3c..e6dcd3acb8 100644 --- a/recipes/economist_free.recipe +++ b/recipes/economist_free.recipe @@ -2,14 +2,14 @@ # License: GPLv3 Copyright: 2008, Kovid Goyal import json -from html5_parser import parse -from lxml import etree from collections import defaultdict from calibre import replace_entities from calibre.ebooks.BeautifulSoup import NavigableString, Tag from calibre.utils.date import parse_only_date from calibre.web.feeds.news import BasicNewsRecipe +from html5_parser import parse +from lxml import etree # For past editions, set date to, for example, '2020-11-28' edition_date = None diff --git a/recipes/economist_world_ahead.recipe b/recipes/economist_world_ahead.recipe index 3e7ce68cdb..98f3e80d17 100644 --- a/recipes/economist_world_ahead.recipe +++ b/recipes/economist_world_ahead.recipe @@ -2,12 +2,12 @@ # License: GPLv3 Copyright: 2008, Kovid Goyal import json -from html5_parser import parse -from lxml import etree from calibre import replace_entities from calibre.ebooks.BeautifulSoup import NavigableString, Tag from calibre.web.feeds.news import BasicNewsRecipe +from html5_parser import parse +from lxml import etree def E(parent, name, text='', **attrs): diff --git a/recipes/edebiyat_haber.recipe b/recipes/edebiyat_haber.recipe index 310c86f1f5..e480901bbf 100644 --- a/recipes/edebiyat_haber.recipe +++ b/recipes/edebiyat_haber.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import AutomaticNewsRecipe diff --git a/recipes/edmonton_journal.recipe b/recipes/edmonton_journal.recipe index d7f9a037e6..5395ba7bda 100644 --- a/recipes/edmonton_journal.recipe +++ b/recipes/edmonton_journal.recipe @@ -1,14 +1,16 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function + __license__ = 'GPL v3' ''' www.canada.com ''' import re -from calibre.web.feeds.recipes import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.recipes import BasicNewsRecipe def new_tag(soup, name, attrs=()): @@ -142,7 +144,7 @@ class CanWestPaper(BasicNewsRecipe): dict(name='li', attrs={'class': 'print'}), dict(name='li', attrs={'class': 'share'}), dict(name='ul', attrs={'class': 'bullet'})] def get_cover_url(self): - from datetime import timedelta, date + from datetime import date, timedelta cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg' + \ str(date.today().day) + '/lg/' + self.fp_tag + '.jpg' br = BasicNewsRecipe.get_browser(self) diff --git a/recipes/eenadu.recipe b/recipes/eenadu.recipe index d6fe7682b8..cebec9e5a2 100644 --- a/recipes/eenadu.recipe +++ b/recipes/eenadu.recipe @@ -1,7 +1,8 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes -from datetime import date, datetime, timedelta -from calibre.utils.date import parse_date import re +from datetime import date, datetime, timedelta + +from calibre.utils.date import parse_date +from calibre.web.feeds.news import BasicNewsRecipe, classes class eenadu_ts(BasicNewsRecipe): diff --git a/recipes/eenadu_ap.recipe b/recipes/eenadu_ap.recipe index 657ccb4ed0..4c7d8d0a2e 100644 --- a/recipes/eenadu_ap.recipe +++ b/recipes/eenadu_ap.recipe @@ -1,7 +1,8 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes -from datetime import date, datetime, timedelta -from calibre.utils.date import parse_date import re +from datetime import date, datetime, timedelta + +from calibre.utils.date import parse_date +from calibre.web.feeds.news import BasicNewsRecipe, classes class eenadu_ap(BasicNewsRecipe): diff --git a/recipes/egedallokalavisen_dk.recipe b/recipes/egedallokalavisen_dk.recipe index 45a85f8ae2..5376a53f29 100644 --- a/recipes/egedallokalavisen_dk.recipe +++ b/recipes/egedallokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Egedal ''' diff --git a/recipes/ekathemerini.recipe b/recipes/ekathemerini.recipe index 1770607c12..abf20e696f 100644 --- a/recipes/ekathemerini.recipe +++ b/recipes/ekathemerini.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.recipes import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.recipes import BasicNewsRecipe from lxml import etree diff --git a/recipes/ekologia_pl.recipe b/recipes/ekologia_pl.recipe index 547740eb2b..3908f04353 100644 --- a/recipes/ekologia_pl.recipe +++ b/recipes/ekologia_pl.recipe @@ -1,7 +1,8 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class EkologiaPl(BasicNewsRecipe): title = u'Ekologia.pl' diff --git a/recipes/el_correo.recipe b/recipes/el_correo.recipe index 7af992a5c6..7fa3f54b9f 100644 --- a/recipes/el_correo.recipe +++ b/recipes/el_correo.recipe @@ -9,8 +9,9 @@ __date__ = '10, September 2017' http://www.elcorreo.com/ ''' -import time import re +import time + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/el_cultural.recipe b/recipes/el_cultural.recipe index aa024cca4b..c502fe4e31 100644 --- a/recipes/el_cultural.recipe +++ b/recipes/el_cultural.recipe @@ -1,4 +1,5 @@ from __future__ import print_function + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/el_mundo_today.recipe b/recipes/el_mundo_today.recipe index 0e40bb3837..15c920b2f4 100644 --- a/recipes/el_mundo_today.recipe +++ b/recipes/el_mundo_today.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/elektroda_pl.recipe b/recipes/elektroda_pl.recipe index 3c1c4f0f67..2a5550ae40 100644 --- a/recipes/elektroda_pl.recipe +++ b/recipes/elektroda_pl.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.news import BasicNewsRecipe class Elektroda(BasicNewsRecipe): diff --git a/recipes/elmundo.recipe b/recipes/elmundo.recipe index baeea6f14a..1432aa1715 100644 --- a/recipes/elmundo.recipe +++ b/recipes/elmundo.recipe @@ -1,4 +1,5 @@ from __future__ import print_function + # -*- mode: python -*- # -*- coding: utf-8 -*- # vim:fileencoding=utf-8 @@ -9,6 +10,7 @@ __copyright__ = '2009-2017, Darko Miletic ' elmundo.es ''' import time + from calibre.ptempfile import PersistentTemporaryFile from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/elperiodico_spanish.recipe b/recipes/elperiodico_spanish.recipe index 61bf06cf59..b6c591c48f 100644 --- a/recipes/elperiodico_spanish.recipe +++ b/recipes/elperiodico_spanish.recipe @@ -7,8 +7,8 @@ __copyright__ = '30 October 2010, Jordi Balcells based on an earlier recipe by D elperiodico.cat ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/eltiempo_hn.recipe b/recipes/eltiempo_hn.recipe index 85f79c2169..283ad74e2f 100644 --- a/recipes/eltiempo_hn.recipe +++ b/recipes/eltiempo_hn.recipe @@ -6,8 +6,8 @@ __copyright__ = '2009, Darko Miletic ' www.tiempo.hn ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/empire_magazine.recipe b/recipes/empire_magazine.recipe index 7ba8762493..c53cb5d855 100644 --- a/recipes/empire_magazine.recipe +++ b/recipes/empire_magazine.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/endgadget.recipe b/recipes/endgadget.recipe index 90dc10bedd..195cb747bc 100644 --- a/recipes/endgadget.recipe +++ b/recipes/endgadget.recipe @@ -8,6 +8,7 @@ engadget.com from calibre.web.feeds.news import BasicNewsRecipe + def classes(classes): q = frozenset(classes.split(' ')) return dict(attrs={'class': lambda x: x and frozenset(x.split()).intersection(q)}) diff --git a/recipes/epw.recipe b/recipes/epw.recipe index 94dda7807a..ba71f35e8c 100644 --- a/recipes/epw.recipe +++ b/recipes/epw.recipe @@ -3,6 +3,7 @@ # License: GPLv3 Copyright: 2015, Kovid Goyal from collections import OrderedDict + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/epw_magazine.recipe b/recipes/epw_magazine.recipe index d3dcae58da..105ee34f7c 100644 --- a/recipes/epw_magazine.recipe +++ b/recipes/epw_magazine.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes from collections import OrderedDict +from calibre.web.feeds.news import BasicNewsRecipe, classes + def absurl(x): if x.startswith('/'): diff --git a/recipes/equestria_daily.recipe b/recipes/equestria_daily.recipe index 75a49416c9..b0d15db6a9 100644 --- a/recipes/equestria_daily.recipe +++ b/recipes/equestria_daily.recipe @@ -1,7 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from calibre.web.feeds.news import BasicNewsRecipe from calibre.utils.date import parse_date, utcnow +from calibre.web.feeds.news import BasicNewsRecipe class AdvancedUserRecipe1639926896(BasicNewsRecipe): diff --git a/recipes/erdinger_anzeiger.recipe b/recipes/erdinger_anzeiger.recipe index 91b2ac3462..08e39d873f 100644 --- a/recipes/erdinger_anzeiger.recipe +++ b/recipes/erdinger_anzeiger.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/erhvervs_avisen_dk.recipe b/recipes/erhvervs_avisen_dk.recipe index 4be331d530..66fca9cd10 100644 --- a/recipes/erhvervs_avisen_dk.recipe +++ b/recipes/erhvervs_avisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Erhvervs•Avisen: RSS feed: Seneste nyt - erhvervsavisen.dk ''' diff --git a/recipes/esbjerglokalavisen_dk.recipe b/recipes/esbjerglokalavisen_dk.recipe index 12b4cadb92..8d40315447 100644 --- a/recipes/esbjerglokalavisen_dk.recipe +++ b/recipes/esbjerglokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Esbjerg: RSS feed: Seneste nyt - esbjerg.lokalavisen.dk ''' diff --git a/recipes/esenja.recipe b/recipes/esenja.recipe index 8d3a20bd14..c17537af9c 100644 --- a/recipes/esenja.recipe +++ b/recipes/esenja.recipe @@ -4,8 +4,9 @@ __license__ = 'GPL v3' __copyright__ = '2010, matek09, matek09@gmail.com' import re -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import BeautifulSoup, Comment +from calibre.web.feeds.news import BasicNewsRecipe class Esensja(BasicNewsRecipe): diff --git a/recipes/esensja_(rss).recipe b/recipes/esensja_(rss).recipe index d8db4d8738..f91607702d 100644 --- a/recipes/esensja_(rss).recipe +++ b/recipes/esensja_(rss).recipe @@ -1,7 +1,8 @@ __license__ = 'GPL v3' import re -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import BeautifulSoup, Comment +from calibre.web.feeds.news import BasicNewsRecipe class EsensjaRSS(BasicNewsRecipe): diff --git a/recipes/espn.recipe b/recipes/espn.recipe index b15d57b65e..fa8f4df801 100644 --- a/recipes/espn.recipe +++ b/recipes/espn.recipe @@ -7,8 +7,9 @@ __docformat__ = 'restructuredtext en' espn.com ''' import re -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ptempfile import TemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe def classes(classes): diff --git a/recipes/estadao.recipe b/recipes/estadao.recipe index 05661c48ca..b16cd9dd52 100644 --- a/recipes/estadao.recipe +++ b/recipes/estadao.recipe @@ -1,8 +1,10 @@ from __future__ import print_function -from calibre.web.feeds.news import BasicNewsRecipe + from datetime import datetime, timedelta + from calibre.ebooks.BeautifulSoup import Tag from calibre.utils.magick import Image, PixelWand +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/evangelizo.recipe b/recipes/evangelizo.recipe index e11cbaa4eb..a0525b0405 100644 --- a/recipes/evangelizo.recipe +++ b/recipes/evangelizo.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/expansion_spanish.recipe b/recipes/expansion_spanish.recipe index 7ba76a1723..674e9f699f 100644 --- a/recipes/expansion_spanish.recipe +++ b/recipes/expansion_spanish.recipe @@ -9,8 +9,9 @@ __date__ = '13, November 2011' [url]http://www.expansion.com/[/url] ''' -import time import re +import time + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/explosm.recipe b/recipes/explosm.recipe index fdec26dcee..d99576c2ae 100644 --- a/recipes/explosm.recipe +++ b/recipes/explosm.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class Explosm(BasicNewsRecipe): title = u'Explosm Rotated' diff --git a/recipes/f1_ultra.recipe b/recipes/f1_ultra.recipe index 507afbea1b..030f8acf78 100644 --- a/recipes/f1_ultra.recipe +++ b/recipes/f1_ultra.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class f1ultra(BasicNewsRecipe): title = u'Formuła 1 - F1 ultra' diff --git a/recipes/fastcompany.recipe b/recipes/fastcompany.recipe index 695b38a6c3..c867c7b8ae 100644 --- a/recipes/fastcompany.recipe +++ b/recipes/fastcompany.recipe @@ -6,8 +6,8 @@ __copyright__ = '2008-2009, Darko Miletic ' www.fastcompany.com ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/favrskovavisen_dk.recipe b/recipes/favrskovavisen_dk.recipe index 5188ba31a3..cb82bed688 100644 --- a/recipes/favrskovavisen_dk.recipe +++ b/recipes/favrskovavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Favrskov Avisen ''' diff --git a/recipes/favrskovlokalavisen_dk.recipe b/recipes/favrskovlokalavisen_dk.recipe index af5c65fda9..a74e8ac4d4 100644 --- a/recipes/favrskovlokalavisen_dk.recipe +++ b/recipes/favrskovlokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Favrskovposten ''' diff --git a/recipes/faznet.recipe b/recipes/faznet.recipe index 89ce59c407..cc59609f70 100644 --- a/recipes/faznet.recipe +++ b/recipes/faznet.recipe @@ -1,6 +1,8 @@ # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + __license__ = 'GPL v3' __copyright__ = '2008-2011, Kovid Goyal , Darko Miletic ' diff --git a/recipes/film_web.recipe b/recipes/film_web.recipe index 7ed105bc2b..77c57458be 100644 --- a/recipes/film_web.recipe +++ b/recipes/film_web.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class FilmWebPl(BasicNewsRecipe): title = 'FilmWeb' diff --git a/recipes/financial_times.recipe b/recipes/financial_times.recipe index c105cfa725..a4c6dfc507 100644 --- a/recipes/financial_times.recipe +++ b/recipes/financial_times.recipe @@ -1,10 +1,10 @@ import json import re -from calibre import browser from urllib.parse import quote -from html5_parser import parse +from calibre import browser from calibre.web.feeds.news import BasicNewsRecipe, classes +from html5_parser import parse class ft(BasicNewsRecipe): diff --git a/recipes/first_things.recipe b/recipes/first_things.recipe index cb125dcf8a..b74538c7a0 100644 --- a/recipes/first_things.recipe +++ b/recipes/first_things.recipe @@ -1,13 +1,14 @@ #!/usr/bin/env python from __future__ import unicode_literals + __license__ = 'GPL v3' __copyright__ = '2017, John Hutson ' ''' firstthings.com ''' import html5lib -from lxml import html from calibre.web.feeds.news import BasicNewsRecipe +from lxml import html class FirstThings(BasicNewsRecipe): diff --git a/recipes/firstpost.recipe b/recipes/firstpost.recipe index f81a19cb44..3bc56eb46f 100644 --- a/recipes/firstpost.recipe +++ b/recipes/firstpost.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe, classes # Firstpost feeds mix sections into other feeds, like explainers end up in opinion feed and opinions end up in India feed. # change google_feeds to True to fetch right sections. diff --git a/recipes/fluter_de.recipe b/recipes/fluter_de.recipe index 627437eeb4..508ae4de6f 100644 --- a/recipes/fluter_de.recipe +++ b/recipes/fluter_de.recipe @@ -12,6 +12,7 @@ Fetch fluter.de from calibre.web.feeds.news import BasicNewsRecipe + class AdvancedUserRecipe1313693926(BasicNewsRecipe): title = u' fluter. ' diff --git a/recipes/focus_de.recipe b/recipes/focus_de.recipe index e111f8cc1c..3b06da2460 100644 --- a/recipes/focus_de.recipe +++ b/recipes/focus_de.recipe @@ -4,6 +4,7 @@ focus.de from calibre.web.feeds.news import BasicNewsRecipe, classes + class AdvancedUserRecipe1305567197(BasicNewsRecipe): title = 'Focus (DE)' __author__ = 'unkn0wn' diff --git a/recipes/fokkeensukke.recipe b/recipes/fokkeensukke.recipe index 47e695b68e..d4734cde73 100644 --- a/recipes/fokkeensukke.recipe +++ b/recipes/fokkeensukke.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup, Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/fokus.recipe b/recipes/fokus.recipe index a4fd58c0cf..505c3c3d45 100644 --- a/recipes/fokus.recipe +++ b/recipes/fokus.recipe @@ -1,8 +1,8 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 from datetime import datetime, timezone -from calibre.web.feeds.news import BasicNewsRecipe +from calibre.web.feeds.news import BasicNewsRecipe WEB_SECTIONS = [ ('Inrikes', 'inrikes'), diff --git a/recipes/folha.recipe b/recipes/folha.recipe index a74e61c585..3bc31aee0e 100644 --- a/recipes/folha.recipe +++ b/recipes/folha.recipe @@ -6,6 +6,7 @@ __copyright__ = '2012, Darko Miletic ' www.folha.uol.com.br ''' from calibre.web.feeds.news import BasicNewsRecipe + try: from urllib.parse import quote_plus except ImportError: diff --git a/recipes/folhadesaopaulo.recipe b/recipes/folhadesaopaulo.recipe index 68f9d32c54..1d3b1414a0 100644 --- a/recipes/folhadesaopaulo.recipe +++ b/recipes/folhadesaopaulo.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/folhadesaopaulo_sub.recipe b/recipes/folhadesaopaulo_sub.recipe index 01b0108530..0b1d263cca 100644 --- a/recipes/folhadesaopaulo_sub.recipe +++ b/recipes/folhadesaopaulo_sub.recipe @@ -1,10 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from calibre.web.feeds.news import BasicNewsRecipe - -import re import datetime +import re + +from calibre.web.feeds.news import BasicNewsRecipe class FSP(BasicNewsRecipe): diff --git a/recipes/folkebladet_dk.recipe b/recipes/folkebladet_dk.recipe index 012b915a45..1f8e24a3e8 100644 --- a/recipes/folkebladet_dk.recipe +++ b/recipes/folkebladet_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Folkebladet ''' diff --git a/recipes/folkebladetdjursland_dk.recipe b/recipes/folkebladetdjursland_dk.recipe index 370fbc7df3..fdca400675 100644 --- a/recipes/folkebladetdjursland_dk.recipe +++ b/recipes/folkebladetdjursland_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Folkebladet Djursland ''' diff --git a/recipes/folketidende_dk.recipe b/recipes/folketidende_dk.recipe index 754d89ac56..13b6041296 100644 --- a/recipes/folketidende_dk.recipe +++ b/recipes/folketidende_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' folketidende.dk ''' diff --git a/recipes/footballua.recipe b/recipes/footballua.recipe index ea6ff53dd8..03231dfb8e 100644 --- a/recipes/footballua.recipe +++ b/recipes/footballua.recipe @@ -3,6 +3,7 @@ from calibre.web.feeds.news import BasicNewsRecipe + class FootballUA(BasicNewsRecipe): title = 'Football.UA' __author__ = 'bugmen00t' diff --git a/recipes/forbes.recipe b/recipes/forbes.recipe index 5ff708618f..880af999dd 100644 --- a/recipes/forbes.recipe +++ b/recipes/forbes.recipe @@ -1,4 +1,5 @@ from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/forbes_pl.recipe b/recipes/forbes_pl.recipe index 6d9a28f993..5a7dbad559 100644 --- a/recipes/forbes_pl.recipe +++ b/recipes/forbes_pl.recipe @@ -2,10 +2,11 @@ __license__ = 'GPL v3' -from calibre.web.feeds.news import BasicNewsRecipe import datetime import re +from calibre.web.feeds.news import BasicNewsRecipe + class forbes_pl(BasicNewsRecipe): title = u'Forbes.pl' diff --git a/recipes/foreignaffairs.recipe b/recipes/foreignaffairs.recipe index 5836c68d05..dd0888c5b2 100644 --- a/recipes/foreignaffairs.recipe +++ b/recipes/foreignaffairs.recipe @@ -4,9 +4,8 @@ import re import html5lib import mechanize -from lxml import html - from calibre.web.feeds.news import BasicNewsRecipe, classes +from lxml import html def as_article(source, log): diff --git a/recipes/forsal.recipe b/recipes/forsal.recipe index 69efcfb203..9ed97b0f76 100644 --- a/recipes/forsal.recipe +++ b/recipes/forsal.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class ForsalPL(BasicNewsRecipe): title = u'Forsal.pl' diff --git a/recipes/foxnews.recipe b/recipes/foxnews.recipe index 3fe1761e7e..d1833347a9 100644 --- a/recipes/foxnews.recipe +++ b/recipes/foxnews.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/fredensborglokalavisen_dk.recipe b/recipes/fredensborglokalavisen_dk.recipe index 0d2538f91e..6d636a08fe 100644 --- a/recipes/fredensborglokalavisen_dk.recipe +++ b/recipes/fredensborglokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Uge-Nyt ''' diff --git a/recipes/fredericialokalavisen_dk.recipe b/recipes/fredericialokalavisen_dk.recipe index de4e3f1152..3fdf24d4c8 100644 --- a/recipes/fredericialokalavisen_dk.recipe +++ b/recipes/fredericialokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Fredericia ''' diff --git a/recipes/frederiksbergbladet_dk.recipe b/recipes/frederiksbergbladet_dk.recipe index 6461981ce9..d7d3f42b0c 100644 --- a/recipes/frederiksbergbladet_dk.recipe +++ b/recipes/frederiksbergbladet_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Frederiksberg Bladet ''' diff --git a/recipes/frederikssundlokalavisen_dk.recipe b/recipes/frederikssundlokalavisen_dk.recipe index 16afa23616..80086f5ce2 100644 --- a/recipes/frederikssundlokalavisen_dk.recipe +++ b/recipes/frederikssundlokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Frederikssund ''' diff --git a/recipes/freisinger_tagblatt.recipe b/recipes/freisinger_tagblatt.recipe index 9ae8c05fcc..766bf2b63a 100644 --- a/recipes/freisinger_tagblatt.recipe +++ b/recipes/freisinger_tagblatt.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/frontline.recipe b/recipes/frontline.recipe index 7a95524c8d..fb23018f18 100644 --- a/recipes/frontline.recipe +++ b/recipes/frontline.recipe @@ -1,6 +1,8 @@ from collections import defaultdict + from calibre.web.feeds.news import BasicNewsRecipe, classes + class Frontline(BasicNewsRecipe): title = u'Frontline' __author__ = 'unkn0wn' diff --git a/recipes/fudzilla.recipe b/recipes/fudzilla.recipe index f6d337a8ea..736588758e 100644 --- a/recipes/fudzilla.recipe +++ b/recipes/fudzilla.recipe @@ -7,6 +7,7 @@ fudzilla.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/furesoelokalavisen_dk.recipe b/recipes/furesoelokalavisen_dk.recipe index e93871be20..bede411a8a 100644 --- a/recipes/furesoelokalavisen_dk.recipe +++ b/recipes/furesoelokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Furesø Avis ''' diff --git a/recipes/furstenfeldbrucker_tagblatt.recipe b/recipes/furstenfeldbrucker_tagblatt.recipe index 3f54dedfa6..c909f5999f 100644 --- a/recipes/furstenfeldbrucker_tagblatt.recipe +++ b/recipes/furstenfeldbrucker_tagblatt.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/galicia_confidential.recipe b/recipes/galicia_confidential.recipe index bb26058fa2..8a06ae859a 100644 --- a/recipes/galicia_confidential.recipe +++ b/recipes/galicia_confidential.recipe @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from calibre.web.feeds.news import BasicNewsRecipe from calibre.web.feeds import Feed +from calibre.web.feeds.news import BasicNewsRecipe class GC_gl(BasicNewsRecipe): diff --git a/recipes/gamekult.recipe b/recipes/gamekult.recipe index 2c0a912f29..f6a0463ab2 100644 --- a/recipes/gamekult.recipe +++ b/recipes/gamekult.recipe @@ -1,4 +1,5 @@ from __future__ import unicode_literals + __license__ = 'GPL v3' __copyright__ = '2013, Malah ' ''' diff --git a/recipes/garmischer_tagblatt.recipe b/recipes/garmischer_tagblatt.recipe index 5b2576a012..d689185113 100644 --- a/recipes/garmischer_tagblatt.recipe +++ b/recipes/garmischer_tagblatt.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/gazeta-prawna-calibre-v1.recipe b/recipes/gazeta-prawna-calibre-v1.recipe index 1921e04511..e78a9f1861 100644 --- a/recipes/gazeta-prawna-calibre-v1.recipe +++ b/recipes/gazeta-prawna-calibre-v1.recipe @@ -8,6 +8,7 @@ gazetaprawna.pl ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/gazeta_pl_bydgoszcz.recipe b/recipes/gazeta_pl_bydgoszcz.recipe index db95c7c383..dbc6fc0b78 100644 --- a/recipes/gazeta_pl_bydgoszcz.recipe +++ b/recipes/gazeta_pl_bydgoszcz.recipe @@ -2,10 +2,11 @@ __license__ = 'GPL v3' -from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import Comment import re +from calibre.ebooks.BeautifulSoup import Comment +from calibre.web.feeds.news import BasicNewsRecipe + class gw_bydgoszcz(BasicNewsRecipe): title = u'Gazeta Wyborcza Bydgoszcz' diff --git a/recipes/gazeta_pl_krakow.recipe b/recipes/gazeta_pl_krakow.recipe index e03e410668..2469536fd2 100644 --- a/recipes/gazeta_pl_krakow.recipe +++ b/recipes/gazeta_pl_krakow.recipe @@ -7,9 +7,10 @@ __copyright__ = 'teepel based on GW from fenuks' krakow.gazeta.pl ''' -from calibre.web.feeds.news import BasicNewsRecipe import re + from calibre.ebooks.BeautifulSoup import Comment +from calibre.web.feeds.news import BasicNewsRecipe class gw_krakow(BasicNewsRecipe): diff --git a/recipes/gazeta_pl_szczecin.recipe b/recipes/gazeta_pl_szczecin.recipe index 50a6cadd30..9dd53619d1 100644 --- a/recipes/gazeta_pl_szczecin.recipe +++ b/recipes/gazeta_pl_szczecin.recipe @@ -1,8 +1,9 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai import re -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Comment +from calibre.web.feeds.news import BasicNewsRecipe class GazetaPlSzczecin(BasicNewsRecipe): diff --git a/recipes/gazeta_pl_warszawa.recipe b/recipes/gazeta_pl_warszawa.recipe index f7c0e4483b..a0fa38e851 100644 --- a/recipes/gazeta_pl_warszawa.recipe +++ b/recipes/gazeta_pl_warszawa.recipe @@ -8,8 +8,9 @@ warszawa.gazeta.pl ''' import re -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Comment +from calibre.web.feeds.news import BasicNewsRecipe class gw_wawa(BasicNewsRecipe): diff --git a/recipes/gazeta_wyborcza.recipe b/recipes/gazeta_wyborcza.recipe index a530aa09e0..9edcee6fb2 100644 --- a/recipes/gazeta_wyborcza.recipe +++ b/recipes/gazeta_wyborcza.recipe @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import Comment import re +from calibre.ebooks.BeautifulSoup import Comment +from calibre.web.feeds.news import BasicNewsRecipe + class Gazeta_Wyborcza(BasicNewsRecipe): title = u'Gazeta Wyborcza' diff --git a/recipes/geek_poke.recipe b/recipes/geek_poke.recipe index 22193d8bbf..027532b1f3 100644 --- a/recipes/geek_poke.recipe +++ b/recipes/geek_poke.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re + from calibre.utils.magick import Image, create_canvas +from calibre.web.feeds.news import BasicNewsRecipe class AdvancedUserRecipe1307556816(BasicNewsRecipe): diff --git a/recipes/gentoftelokalavisen_dk.recipe b/recipes/gentoftelokalavisen_dk.recipe index f3239d4f98..1b023c11ca 100644 --- a/recipes/gentoftelokalavisen_dk.recipe +++ b/recipes/gentoftelokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Villabyerne ''' diff --git a/recipes/geretsrieder_merkur.recipe b/recipes/geretsrieder_merkur.recipe index e04c553fcd..776b6bfa85 100644 --- a/recipes/geretsrieder_merkur.recipe +++ b/recipes/geretsrieder_merkur.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/gildia_pl.recipe b/recipes/gildia_pl.recipe index 4a6325edf5..dc349ee206 100644 --- a/recipes/gildia_pl.recipe +++ b/recipes/gildia_pl.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class Gildia(BasicNewsRecipe): title = u'Gildia.pl' diff --git a/recipes/github.recipe b/recipes/github.recipe index 4bb78a8fd5..1024624ffc 100644 --- a/recipes/github.recipe +++ b/recipes/github.recipe @@ -1,6 +1,8 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe + class GithubBlog(BasicNewsRecipe): title = u'Github Blog' language = 'en' diff --git a/recipes/glennbeck.recipe b/recipes/glennbeck.recipe index 186becf2f5..3ce2362812 100644 --- a/recipes/glennbeck.recipe +++ b/recipes/glennbeck.recipe @@ -1,5 +1,5 @@ +from calibre.ebooks.BeautifulSoup import BeautifulSoup, Comment, Tag from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import BeautifulSoup, Tag, Comment def new_tag(soup, name, attrs=()): diff --git a/recipes/globaltimes.recipe b/recipes/globaltimes.recipe index 4d5cce019f..911afa91d1 100644 --- a/recipes/globaltimes.recipe +++ b/recipes/globaltimes.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + def classes(classes): q = frozenset(classes.split(' ')) diff --git a/recipes/go_comics.recipe b/recipes/go_comics.recipe index 740e4317c9..57c23d87e1 100644 --- a/recipes/go_comics.recipe +++ b/recipes/go_comics.recipe @@ -3,11 +3,13 @@ __copyright__ = 'Copyright 2010 Starson17' ''' www.gocomics.com ''' -import shutil, os +import os +import shutil + from calibre.constants import iswindows -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ptempfile import PersistentTemporaryDirectory from calibre.utils.filenames import ascii_filename +from calibre.web.feeds.news import BasicNewsRecipe def absolutize(url): diff --git a/recipes/google_news.recipe b/recipes/google_news.recipe index 42c4cc666a..39cc3aa62a 100644 --- a/recipes/google_news.recipe +++ b/recipes/google_news.recipe @@ -1,10 +1,12 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function -from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ptempfile import PersistentTemporaryFile +from __future__ import absolute_import, division, print_function, unicode_literals + import json +from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe + # a serarch topic, filled into the string below. You can change that to anything google news should be searched for... terms_to_search_for = ( 'computer', diff --git a/recipes/gosc_full.recipe b/recipes/gosc_full.recipe index 0857ad5fe8..a611a10f2c 100644 --- a/recipes/gosc_full.recipe +++ b/recipes/gosc_full.recipe @@ -5,9 +5,10 @@ __license__ = 'GPL v3' __copyright__ = '2011, Piotr Kontek, piotr.kontek@gmail.com \ 2013-2018, Tomasz Długosz, tomek3d@gmail.com' -from calibre.web.feeds.news import BasicNewsRecipe import re import time + +from calibre.web.feeds.news import BasicNewsRecipe from lxml import html diff --git a/recipes/gosc_niedzielny.recipe b/recipes/gosc_niedzielny.recipe index 5d19eab4e5..fa973b2535 100644 --- a/recipes/gosc_niedzielny.recipe +++ b/recipes/gosc_niedzielny.recipe @@ -5,8 +5,9 @@ __license__ = 'GPL v3' __copyright__ = '2011, Piotr Kontek, piotr.kontek@gmail.com \ 2013-2018, Tomasz Długosz, tomek3d@gmail.com' -from calibre.web.feeds.news import BasicNewsRecipe import re + +from calibre.web.feeds.news import BasicNewsRecipe from lxml import html diff --git a/recipes/gram_pl.recipe b/recipes/gram_pl.recipe index 77267d93ed..ca5d843478 100644 --- a/recipes/gram_pl.recipe +++ b/recipes/gram_pl.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.news import BasicNewsRecipe class Gram_pl(BasicNewsRecipe): diff --git a/recipes/grandes_corresponsales_es.recipe b/recipes/grandes_corresponsales_es.recipe index 17337b9001..c16e550ed4 100644 --- a/recipes/grandes_corresponsales_es.recipe +++ b/recipes/grandes_corresponsales_es.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/grantland.recipe b/recipes/grantland.recipe index 0c59eed83f..c0d400e84f 100644 --- a/recipes/grantland.recipe +++ b/recipes/grantland.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/grenaalokalavisen_dk.recipe b/recipes/grenaalokalavisen_dk.recipe index 427ab17278..7ba89f98c7 100644 --- a/recipes/grenaalokalavisen_dk.recipe +++ b/recipes/grenaalokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Grenaa ''' diff --git a/recipes/gribskovlokalavisen_dk.recipe b/recipes/gribskovlokalavisen_dk.recipe index 81d663799a..d800f7aba5 100644 --- a/recipes/gribskovlokalavisen_dk.recipe +++ b/recipes/gribskovlokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Ugeposten Gribskov ''' diff --git a/recipes/gry_online_pl.recipe b/recipes/gry_online_pl.recipe index c804c573f4..d769443d29 100644 --- a/recipes/gry_online_pl.recipe +++ b/recipes/gry_online_pl.recipe @@ -1,7 +1,9 @@ from __future__ import print_function + import time -from calibre.web.feeds.recipes import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Comment +from calibre.web.feeds.recipes import BasicNewsRecipe class GryOnlinePl(BasicNewsRecipe): diff --git a/recipes/gs24_pl.recipe b/recipes/gs24_pl.recipe index b5e58e6b60..9f24b1e66f 100644 --- a/recipes/gs24_pl.recipe +++ b/recipes/gs24_pl.recipe @@ -2,6 +2,7 @@ import re import string + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/guardian.recipe b/recipes/guardian.recipe index bdc9425306..68795c062a 100644 --- a/recipes/guardian.recipe +++ b/recipes/guardian.recipe @@ -6,9 +6,10 @@ __docformat__ = 'restructuredtext en' ''' www.guardian.co.uk ''' +from datetime import date + from calibre import random_user_agent from calibre.web.feeds.news import BasicNewsRecipe -from datetime import date def classes(classes): diff --git a/recipes/gva_be.recipe b/recipes/gva_be.recipe index 554b61d1d5..e2f304f26e 100644 --- a/recipes/gva_be.recipe +++ b/recipes/gva_be.recipe @@ -1,6 +1,6 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals __license__ = 'GPL v3' __copyright__ = '2009, Darko Miletic ' @@ -10,6 +10,7 @@ www.gva.be ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/haaretz_en.recipe b/recipes/haaretz_en.recipe index 4f476884cd..525194c5d4 100644 --- a/recipes/haaretz_en.recipe +++ b/recipes/haaretz_en.recipe @@ -8,6 +8,7 @@ www.haaretz.com ''' from calibre.web.feeds.news import BasicNewsRecipe + try: from urllib.parse import urlencode except ImportError: diff --git a/recipes/hackernews.recipe b/recipes/hackernews.recipe index d81e493437..bae34b183b 100644 --- a/recipes/hackernews.recipe +++ b/recipes/hackernews.recipe @@ -4,8 +4,9 @@ __license__ = 'GPL v3' ''' Hacker News ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe + try: from urllib.parse import urlparse except ImportError: diff --git a/recipes/haderslevlokalavisen_dk.recipe b/recipes/haderslevlokalavisen_dk.recipe index d5c9c0449e..acf69c606b 100644 --- a/recipes/haderslevlokalavisen_dk.recipe +++ b/recipes/haderslevlokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Haderslev ''' diff --git a/recipes/hamilton_spectator.recipe b/recipes/hamilton_spectator.recipe index 2fd7635782..f6cb136740 100644 --- a/recipes/hamilton_spectator.recipe +++ b/recipes/hamilton_spectator.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe, classes ''' Hamilton Spectator Calibre Recipe diff --git a/recipes/handelsblatt.recipe b/recipes/handelsblatt.recipe index 9b58213b95..f8285cb48a 100644 --- a/recipes/handelsblatt.recipe +++ b/recipes/handelsblatt.recipe @@ -2,13 +2,14 @@ # vim:fileencoding=utf-8 # License: GPLv3 Copyright: 2016, Aimylios -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals ''' handelsblatt.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/himal_southasian.recipe b/recipes/himal_southasian.recipe index 8efc9c9629..5025806326 100644 --- a/recipes/himal_southasian.recipe +++ b/recipes/himal_southasian.recipe @@ -1,6 +1,8 @@ +import json + from calibre.web.feeds.news import BasicNewsRecipe from html5_parser import parse -import json + def get_story(story): str_type = story.get('type', '') diff --git a/recipes/hindu.recipe b/recipes/hindu.recipe index c8a1a75e70..9b5e695e76 100644 --- a/recipes/hindu.recipe +++ b/recipes/hindu.recipe @@ -2,8 +2,10 @@ import json import re from collections import defaultdict from datetime import date + from calibre.web.feeds.news import BasicNewsRecipe, classes + def absurl(url): if url.startswith('/'): url = 'https://www.thehindu.com' + url diff --git a/recipes/hindu_business_line_print_edition.recipe b/recipes/hindu_business_line_print_edition.recipe index c61df77105..b0811a087c 100644 --- a/recipes/hindu_business_line_print_edition.recipe +++ b/recipes/hindu_business_line_print_edition.recipe @@ -2,6 +2,7 @@ import json import re from collections import defaultdict from datetime import date + from calibre.web.feeds.news import BasicNewsRecipe, classes diff --git a/recipes/hindufeeds.recipe b/recipes/hindufeeds.recipe index 9018824cc5..113ac6350f 100644 --- a/recipes/hindufeeds.recipe +++ b/recipes/hindufeeds.recipe @@ -1,6 +1,8 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes from datetime import date +from calibre.web.feeds.news import BasicNewsRecipe, classes + + class TheHindufeeds(BasicNewsRecipe): title = 'The Hindu (Feeds)' __author__ = 'unkn0wn' diff --git a/recipes/hindustan_times_print.recipe b/recipes/hindustan_times_print.recipe index 295aaf8660..a8eee1e21a 100644 --- a/recipes/hindustan_times_print.recipe +++ b/recipes/hindustan_times_print.recipe @@ -1,7 +1,8 @@ -from calibre.web.feeds.news import BasicNewsRecipe import json -from datetime import date from collections import defaultdict +from datetime import date + +from calibre.web.feeds.news import BasicNewsRecipe # figure out your local_edition from the fetch news log of this recipe local_edition = 'Delhi' diff --git a/recipes/hindutamil.recipe b/recipes/hindutamil.recipe index 02d831501a..0c58577d57 100644 --- a/recipes/hindutamil.recipe +++ b/recipes/hindutamil.recipe @@ -1,6 +1,7 @@ from calibre.ptempfile import PersistentTemporaryFile from calibre.web.feeds.news import BasicNewsRecipe, classes + class hindutamil(BasicNewsRecipe): title = 'இந்து தமிழ் திசை' __author__ = 'unkn0wn' diff --git a/recipes/history_today.recipe b/recipes/history_today.recipe index 61f17128d8..eed6efad0a 100644 --- a/recipes/history_today.recipe +++ b/recipes/history_today.recipe @@ -1,5 +1,6 @@ -from collections import OrderedDict import re +from collections import OrderedDict + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/hoersholmlokalavisen_dk.recipe b/recipes/hoersholmlokalavisen_dk.recipe index 27758d4935..476d2f0814 100644 --- a/recipes/hoersholmlokalavisen_dk.recipe +++ b/recipes/hoersholmlokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Ugebladet ''' diff --git a/recipes/hola.recipe b/recipes/hola.recipe index ad711674b6..dae6328cac 100644 --- a/recipes/hola.recipe +++ b/recipes/hola.recipe @@ -11,6 +11,7 @@ http://www.hola.com/ ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/holzkirchener_merkur.recipe b/recipes/holzkirchener_merkur.recipe index 07ac1b476b..bc6db22f57 100644 --- a/recipes/holzkirchener_merkur.recipe +++ b/recipes/holzkirchener_merkur.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/horizons.recipe b/recipes/horizons.recipe index fa95ad7a77..5a28915076 100644 --- a/recipes/horizons.recipe +++ b/recipes/horizons.recipe @@ -4,6 +4,7 @@ https://www.cirsd.org/en/horizons from calibre.web.feeds.news import BasicNewsRecipe, classes + class horizons(BasicNewsRecipe): title = 'Horizons' __author__ = 'unkn0wn' diff --git a/recipes/hornsherredavis_dk.recipe b/recipes/hornsherredavis_dk.recipe index e2845972f7..a60e5e6ac6 100644 --- a/recipes/hornsherredavis_dk.recipe +++ b/recipes/hornsherredavis_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Hornsherred Avis ''' diff --git a/recipes/hornsherredlokalavisen_dk.recipe b/recipes/hornsherredlokalavisen_dk.recipe index 773887ce71..b3d453bed2 100644 --- a/recipes/hornsherredlokalavisen_dk.recipe +++ b/recipes/hornsherredlokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Hornsherred ''' diff --git a/recipes/houston_chronicle.recipe b/recipes/houston_chronicle.recipe index 70fdf55ee6..2f65c07fb4 100644 --- a/recipes/houston_chronicle.recipe +++ b/recipes/houston_chronicle.recipe @@ -1,22 +1,23 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function + __license__ = 'GPL v3' __copyright__ = '2018, Dale Furrow dkfurrow@gmail.com' ''' chron.com ''' import re -import time -from datetime import datetime -import traceback import sys +import time +import traceback from collections import OrderedDict +from datetime import datetime -from calibre.web.feeds.recipes import BasicNewsRecipe -from calibre.utils.cleantext import clean_ascii_chars from calibre.ebooks.BeautifulSoup import NavigableString +from calibre.utils.cleantext import clean_ascii_chars from calibre.utils.date import dt_factory, local_tz, utcfromtimestamp +from calibre.web.feeds.recipes import BasicNewsRecipe regex_date_only = re.compile(r"""(?:January|February|March|April| {8}May|June|July|August|September|October|November| diff --git a/recipes/hoy.recipe b/recipes/hoy.recipe index a02db1cec4..8811b0e079 100644 --- a/recipes/hoy.recipe +++ b/recipes/hoy.recipe @@ -7,8 +7,8 @@ __copyright__ = '2010, Francisco Javier Nieto ' www.hoy.es ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/hrt.recipe b/recipes/hrt.recipe index 40a4103591..3042d074ce 100644 --- a/recipes/hrt.recipe +++ b/recipes/hrt.recipe @@ -8,8 +8,9 @@ www.hrt.hr ''' import re -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/huffingtonpost.recipe b/recipes/huffingtonpost.recipe index 95e9c362ea..253e9c77f2 100644 --- a/recipes/huffingtonpost.recipe +++ b/recipes/huffingtonpost.recipe @@ -1,4 +1,5 @@ from __future__ import print_function + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/hvidovreavis_dk.recipe b/recipes/hvidovreavis_dk.recipe index 8c77bf52fc..2eed9d54d8 100644 --- a/recipes/hvidovreavis_dk.recipe +++ b/recipes/hvidovreavis_dk.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/hvidovrelokalavisen_dk.recipe b/recipes/hvidovrelokalavisen_dk.recipe index 61861cf7e3..21a1169442 100644 --- a/recipes/hvidovrelokalavisen_dk.recipe +++ b/recipes/hvidovrelokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Hvidovre Avis ''' diff --git a/recipes/id_pixel.recipe b/recipes/id_pixel.recipe index ac55cb039d..eb74e1efd6 100644 --- a/recipes/id_pixel.recipe +++ b/recipes/id_pixel.recipe @@ -1,7 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/ieee_spectrum_mag.recipe b/recipes/ieee_spectrum_mag.recipe index a8c5bed300..11c65b91f2 100644 --- a/recipes/ieee_spectrum_mag.recipe +++ b/recipes/ieee_spectrum_mag.recipe @@ -1,9 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from calibre.web.feeds.news import BasicNewsRecipe import datetime +from calibre.web.feeds.news import BasicNewsRecipe + class IEEESpectrumMagazine(BasicNewsRecipe): title = "IEEE Spectrum Magazine" diff --git a/recipes/iekspries.recipe b/recipes/iekspries.recipe index 760c7e77e2..bede039bd3 100644 --- a/recipes/iekspries.recipe +++ b/recipes/iekspries.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/ifzm.recipe b/recipes/ifzm.recipe index 9d46bd6b84..d64fd3c050 100644 --- a/recipes/ifzm.recipe +++ b/recipes/ifzm.recipe @@ -1,6 +1,8 @@ -from calibre.web.feeds.news import BasicNewsRecipe import json +from calibre.web.feeds.news import BasicNewsRecipe + + def json_to_html(raw, link): data = json.loads(raw) data = data['data']['content'] diff --git a/recipes/ihned.cz.recipe b/recipes/ihned.cz.recipe index b1e83e5a53..29cb41c2e2 100644 --- a/recipes/ihned.cz.recipe +++ b/recipes/ihned.cz.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/ihned.recipe b/recipes/ihned.recipe index 8874d3e3c6..1d4b8993f6 100644 --- a/recipes/ihned.recipe +++ b/recipes/ihned.recipe @@ -1,5 +1,6 @@ import re import time + from calibre import strftime from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/iktibas.recipe b/recipes/iktibas.recipe index bfcedc3ceb..9c1ec9ef27 100644 --- a/recipes/iktibas.recipe +++ b/recipes/iktibas.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import AutomaticNewsRecipe diff --git a/recipes/il_messaggero.recipe b/recipes/il_messaggero.recipe index c07112a9e1..ad6ac66af7 100644 --- a/recipes/il_messaggero.recipe +++ b/recipes/il_messaggero.recipe @@ -8,6 +8,7 @@ description = 'Italian daily newspaper - v1.01 (04, January 2010)' http://www.messaggero.it/ ''' import time + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/il_post.recipe b/recipes/il_post.recipe index c862ca88d7..42a08d5964 100644 --- a/recipes/il_post.recipe +++ b/recipes/il_post.recipe @@ -9,9 +9,11 @@ ## from __future__ import absolute_import, division, print_function, unicode_literals -from calibre.web.feeds.news import BasicNewsRecipe + from datetime import date, timedelta +from calibre.web.feeds.news import BasicNewsRecipe + dates = [ date.today().strftime('%Y/%m/%d'), (date.today() - timedelta(1)).strftime('%Y/%m/%d') ] # ----------- CUSTOMIZATION OPTIONS START ----------- diff --git a/recipes/iliteratura_cz.recipe b/recipes/iliteratura_cz.recipe index 9dac6ecf01..8ffab299ca 100644 --- a/recipes/iliteratura_cz.recipe +++ b/recipes/iliteratura_cz.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class SmeRecipe(BasicNewsRecipe): __license__ = 'GPL v3' diff --git a/recipes/ilmanifesto.recipe b/recipes/ilmanifesto.recipe index 162ce50c2b..6ea5a50ca7 100644 --- a/recipes/ilmanifesto.recipe +++ b/recipes/ilmanifesto.recipe @@ -1,6 +1,6 @@ from calibre import strftime -from calibre.web.feeds.recipes import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.recipes import BasicNewsRecipe MANIFESTO_BASEURL = 'http://www.ilmanifesto.it/' diff --git a/recipes/in4_pl.recipe b/recipes/in4_pl.recipe index 46c9e930c0..b80b1255a9 100644 --- a/recipes/in4_pl.recipe +++ b/recipes/in4_pl.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re + from calibre.ebooks.BeautifulSoup import Comment +from calibre.web.feeds.news import BasicNewsRecipe class in4(BasicNewsRecipe): diff --git a/recipes/inc42.recipe b/recipes/inc42.recipe index 5aaa10ddb3..de1c921d6c 100644 --- a/recipes/inc42.recipe +++ b/recipes/inc42.recipe @@ -1,6 +1,7 @@ from calibre.ptempfile import PersistentTemporaryFile from calibre.web.feeds.news import BasicNewsRecipe, classes + class inc42(BasicNewsRecipe): title = 'Inc42' __author__ = 'unkn0wn' diff --git a/recipes/independent.recipe b/recipes/independent.recipe index 0073053681..91989467cd 100644 --- a/recipes/independent.recipe +++ b/recipes/independent.recipe @@ -1,8 +1,8 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 from calibre import random_user_agent -from calibre.web.feeds.recipes import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.recipes import BasicNewsRecipe def classes(classes): diff --git a/recipes/independent_australia.recipe b/recipes/independent_australia.recipe index 993bba9a9e..1e2f5148da 100644 --- a/recipes/independent_australia.recipe +++ b/recipes/independent_australia.recipe @@ -1,7 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals __license__ = 'GPL v3' __copyright__ = '2020, Pat Stapleton ' @@ -9,8 +9,8 @@ __copyright__ = '2020, Pat Stapleton ' Recipe for Independent Australia ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.web.feeds import Feed +from calibre.web.feeds.news import BasicNewsRecipe class IndependentAustralia(BasicNewsRecipe): diff --git a/recipes/india_today.recipe b/recipes/india_today.recipe index 33cd5c2daa..ae6bf54c68 100644 --- a/recipes/india_today.recipe +++ b/recipes/india_today.recipe @@ -1,6 +1,6 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def classes(classes): diff --git a/recipes/indian_express.recipe b/recipes/indian_express.recipe index 5a97429daa..1e3b6c2b13 100644 --- a/recipes/indian_express.recipe +++ b/recipes/indian_express.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes from datetime import datetime, timedelta + from calibre.utils.date import parse_date +from calibre.web.feeds.news import BasicNewsRecipe, classes class IndianExpress(BasicNewsRecipe): diff --git a/recipes/information_dk.recipe b/recipes/information_dk.recipe index 7782a59d5d..632fdd3288 100644 --- a/recipes/information_dk.recipe +++ b/recipes/information_dk.recipe @@ -6,6 +6,7 @@ information.dk ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/ing_dk.recipe b/recipes/ing_dk.recipe index dc0c22dcac..e75e24d5a8 100644 --- a/recipes/ing_dk.recipe +++ b/recipes/ing_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Ingeniøren.dk ''' diff --git a/recipes/insider.recipe b/recipes/insider.recipe index 394a5a7b07..7a53daca3c 100644 --- a/recipes/insider.recipe +++ b/recipes/insider.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals + import re from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/irish_times.recipe b/recipes/irish_times.recipe index b868d152da..fcc2dd6339 100644 --- a/recipes/irish_times.recipe +++ b/recipes/irish_times.recipe @@ -5,7 +5,9 @@ irishtimes.com ''' import json from uuid import uuid4 + from mechanize import Request + try: from urllib.parse import urlencode except ImportError: diff --git a/recipes/irish_times_free.recipe b/recipes/irish_times_free.recipe index cf1d16ae69..dde5ee3bbf 100644 --- a/recipes/irish_times_free.recipe +++ b/recipes/irish_times_free.recipe @@ -1,5 +1,6 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe, classes + class IrishTimes(BasicNewsRecipe): title = 'The Irish Times (free)' diff --git a/recipes/isar-loisachbote.recipe b/recipes/isar-loisachbote.recipe index 035377a957..68769bcf5f 100644 --- a/recipes/isar-loisachbote.recipe +++ b/recipes/isar-loisachbote.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/istorias.recipe b/recipes/istorias.recipe index ad28db9289..43d1117825 100644 --- a/recipes/istorias.recipe +++ b/recipes/istorias.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import AutomaticNewsRecipe diff --git a/recipes/ivanamilakovic.recipe b/recipes/ivanamilakovic.recipe index a80e6ee65b..03c2cf7ac0 100644 --- a/recipes/ivanamilakovic.recipe +++ b/recipes/ivanamilakovic.recipe @@ -7,6 +7,7 @@ ivanamilakovic.blogspot.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/ixbt.recipe b/recipes/ixbt.recipe index 97e7f68b04..24493cb4c2 100644 --- a/recipes/ixbt.recipe +++ b/recipes/ixbt.recipe @@ -1,7 +1,8 @@ #!/usr/bin/env python2 # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/japaa.recipe b/recipes/japaa.recipe index 723e036b5a..8693b054a6 100644 --- a/recipes/japaa.recipe +++ b/recipes/japaa.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/jbpress.recipe b/recipes/jbpress.recipe index 97f120cc2b..6015f86cdf 100644 --- a/recipes/jbpress.recipe +++ b/recipes/jbpress.recipe @@ -3,6 +3,7 @@ try: except ImportError: from urllib2 import urlopen import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/jeuxvideo.recipe b/recipes/jeuxvideo.recipe index 4d6b929bc2..54f13696c0 100644 --- a/recipes/jeuxvideo.recipe +++ b/recipes/jeuxvideo.recipe @@ -1,4 +1,5 @@ from __future__ import unicode_literals + __license__ = 'GPL v3' __copyright__ = '2013, Malah ' ''' diff --git a/recipes/johm.recipe b/recipes/johm.recipe index 6e6ad4175f..8fb0595ae3 100644 --- a/recipes/johm.recipe +++ b/recipes/johm.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/joop.recipe b/recipes/joop.recipe index 09f967680a..3464c4a548 100644 --- a/recipes/joop.recipe +++ b/recipes/joop.recipe @@ -1,7 +1,8 @@ -from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import Tag import re +from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe + def new_tag(soup, name, attrs=()): impl = getattr(soup, 'new_tag', None) diff --git a/recipes/jot_down.recipe b/recipes/jot_down.recipe index 5c7e0df477..65c762a013 100644 --- a/recipes/jot_down.recipe +++ b/recipes/jot_down.recipe @@ -10,6 +10,7 @@ http://www.jotdown.es/ ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/journalofaccountancy.recipe b/recipes/journalofaccountancy.recipe index a9ad6adfae..005d772e67 100644 --- a/recipes/journalofaccountancy.recipe +++ b/recipes/journalofaccountancy.recipe @@ -5,10 +5,11 @@ from __future__ import absolute_import, division, print_function, unicode_literals import json -from time import sleep -from mechanize import Request from contextlib import closing +from time import sleep + from calibre.web.feeds.news import BasicNewsRecipe +from mechanize import Request def absolutize(url): diff --git a/recipes/jsonline.recipe b/recipes/jsonline.recipe index 92963c605e..3da4bc930d 100644 --- a/recipes/jsonline.recipe +++ b/recipes/jsonline.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.news import BasicNewsRecipe class JSOnline(BasicNewsRecipe): diff --git a/recipes/jutarnji.recipe b/recipes/jutarnji.recipe index 4c939cfc26..13019e95a5 100644 --- a/recipes/jutarnji.recipe +++ b/recipes/jutarnji.recipe @@ -7,8 +7,9 @@ jutarnji.hr ''' import re -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/juventudrebelde.recipe b/recipes/juventudrebelde.recipe index 87e82f65ed..9dd33892d1 100644 --- a/recipes/juventudrebelde.recipe +++ b/recipes/juventudrebelde.recipe @@ -4,6 +4,7 @@ __copyright__ = '2011, Oscar Megia Lopez' juventudrebelde.cu ''' import re + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/jv_dk.recipe b/recipes/jv_dk.recipe index a01206e515..7514e281dd 100644 --- a/recipes/jv_dk.recipe +++ b/recipes/jv_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' JydskeVestkysten | JV.dk | jv.dk ''' diff --git a/recipes/kaloeviglokalavisen_dk.recipe b/recipes/kaloeviglokalavisen_dk.recipe index 366b15dbac..a083e9f8c8 100644 --- a/recipes/kaloeviglokalavisen_dk.recipe +++ b/recipes/kaloeviglokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Kalø Vig ''' diff --git a/recipes/karlsruhe.recipe b/recipes/karlsruhe.recipe index ce443f72c8..90b1a5842f 100644 --- a/recipes/karlsruhe.recipe +++ b/recipes/karlsruhe.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/karsi_gazete.recipe b/recipes/karsi_gazete.recipe index 7d28484250..8c2115d46e 100644 --- a/recipes/karsi_gazete.recipe +++ b/recipes/karsi_gazete.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/kgsenghavebladet_dk.recipe b/recipes/kgsenghavebladet_dk.recipe index f4f7328114..2cda9bd779 100644 --- a/recipes/kgsenghavebladet_dk.recipe +++ b/recipes/kgsenghavebladet_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Kgs. Enghave Bladet ''' diff --git a/recipes/kidney.recipe b/recipes/kidney.recipe index b3088e3c33..4048dcbc1c 100644 --- a/recipes/kidney.recipe +++ b/recipes/kidney.recipe @@ -2,8 +2,8 @@ import time -from calibre.web.feeds.recipes import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.recipes import BasicNewsRecipe class JASN(BasicNewsRecipe): diff --git a/recipes/kleinezeitung.recipe b/recipes/kleinezeitung.recipe index b43e585327..fa22eb0af2 100644 --- a/recipes/kleinezeitung.recipe +++ b/recipes/kleinezeitung.recipe @@ -1,6 +1,6 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/klubknjige.recipe b/recipes/klubknjige.recipe index 9aad54ed93..c653036ac1 100644 --- a/recipes/klubknjige.recipe +++ b/recipes/klubknjige.recipe @@ -6,6 +6,7 @@ klub-knjige.blogspot.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/koegelokalavisen_dk.recipe b/recipes/koegelokalavisen_dk.recipe index 62fe6d5081..a43f4c78e7 100644 --- a/recipes/koegelokalavisen_dk.recipe +++ b/recipes/koegelokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lørdagsavisen ''' diff --git a/recipes/koldinglokalavisen_dk.recipe b/recipes/koldinglokalavisen_dk.recipe index 85d01a28b5..e57397e607 100644 --- a/recipes/koldinglokalavisen_dk.recipe +++ b/recipes/koldinglokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Kolding ''' diff --git a/recipes/kommunalsundhed_dk.recipe b/recipes/kommunalsundhed_dk.recipe index 37deab145c..c5c9a2f5b1 100644 --- a/recipes/kommunalsundhed_dk.recipe +++ b/recipes/kommunalsundhed_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Kommunal Sundhed ''' diff --git a/recipes/kompas.recipe b/recipes/kompas.recipe index 657500209b..ad9ab3d539 100644 --- a/recipes/kompas.recipe +++ b/recipes/kompas.recipe @@ -10,6 +10,7 @@ http://www.kompas.com/ ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/kopalniawiedzy.recipe b/recipes/kopalniawiedzy.recipe index cd708cf095..c9189ca643 100644 --- a/recipes/kopalniawiedzy.recipe +++ b/recipes/kopalniawiedzy.recipe @@ -3,6 +3,7 @@ __copyright__ = '2011 Attis , 2012 Tomasz Długosz diff --git a/recipes/leggo_it.recipe b/recipes/leggo_it.recipe index 0539b45f73..2ad79b1db8 100644 --- a/recipes/leggo_it.recipe +++ b/recipes/leggo_it.recipe @@ -8,6 +8,7 @@ description = 'Italian daily newspaper - v1.00 05-05-2010' http://www.leggo.it ''' import time + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/lenta_ru.recipe b/recipes/lenta_ru.recipe index a406916664..8e159c2531 100644 --- a/recipes/lenta_ru.recipe +++ b/recipes/lenta_ru.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 from __future__ import unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/letsgetcritical.recipe b/recipes/letsgetcritical.recipe index 7e47b0d318..39d47c4ff9 100644 --- a/recipes/letsgetcritical.recipe +++ b/recipes/letsgetcritical.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/levante.recipe b/recipes/levante.recipe index ab236393cf..eb4d09e581 100644 --- a/recipes/levante.recipe +++ b/recipes/levante.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/lidovky.recipe b/recipes/lidovky.recipe index adf8677a54..173cbd2768 100644 --- a/recipes/lidovky.recipe +++ b/recipes/lidovky.recipe @@ -1,8 +1,10 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals -from calibre.web.feeds.recipes import BasicNewsRecipe + import re +from calibre.web.feeds.recipes import BasicNewsRecipe + class lnRecipe(BasicNewsRecipe): __author__ = 'bubak' diff --git a/recipes/limba_sarda.recipe b/recipes/limba_sarda.recipe index 1a75311c2d..dea5dadb77 100644 --- a/recipes/limba_sarda.recipe +++ b/recipes/limba_sarda.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import AutomaticNewsRecipe diff --git a/recipes/linux_news_de.recipe b/recipes/linux_news_de.recipe index 47e8a0bd5f..dd0c391482 100644 --- a/recipes/linux_news_de.recipe +++ b/recipes/linux_news_de.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python2 # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/list_apart.recipe b/recipes/list_apart.recipe index d7998ffd62..01c01f30c5 100644 --- a/recipes/list_apart.recipe +++ b/recipes/list_apart.recipe @@ -1,8 +1,10 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals -from calibre.web.feeds.news import BasicNewsRecipe + import re +from calibre.web.feeds.news import BasicNewsRecipe + class AListApart (BasicNewsRecipe): __author__ = 'Marc Busqué ' diff --git a/recipes/live_law.recipe b/recipes/live_law.recipe index 67c524f538..747a5a1759 100644 --- a/recipes/live_law.recipe +++ b/recipes/live_law.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes from urllib.parse import quote +from calibre.web.feeds.news import BasicNewsRecipe, classes + class livelaw(BasicNewsRecipe): title = 'Live Law' diff --git a/recipes/livemint.recipe b/recipes/livemint.recipe index a1ff2cb692..6d8c086a76 100644 --- a/recipes/livemint.recipe +++ b/recipes/livemint.recipe @@ -1,6 +1,7 @@ import json import re from datetime import date + from calibre.web.feeds.news import BasicNewsRecipe, classes is_saturday = date.today().weekday() == 5 diff --git a/recipes/lwn_weekly.recipe b/recipes/lwn_weekly.recipe index 6e26770c33..108955554f 100644 --- a/recipes/lwn_weekly.recipe +++ b/recipes/lwn_weekly.recipe @@ -1,16 +1,18 @@ #!/usr/bin/env python from __future__ import print_function + __license__ = 'GPL v3' __copyright__ = '2011, Davide Cavalca ' ''' lwn.net ''' -from calibre.web.feeds.news import BasicNewsRecipe import re import sys +from calibre.web.feeds.news import BasicNewsRecipe + class WeeklyLWN(BasicNewsRecipe): title = 'LWN.net Weekly Edition' diff --git a/recipes/lyngby-taarbaeklokalavisen_dk.recipe b/recipes/lyngby-taarbaeklokalavisen_dk.recipe index fa550abafe..7641eb743f 100644 --- a/recipes/lyngby-taarbaeklokalavisen_dk.recipe +++ b/recipes/lyngby-taarbaeklokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Det grønne område ''' diff --git a/recipes/macrobusiness.recipe b/recipes/macrobusiness.recipe index 35a6900410..3c2ca3e3f3 100644 --- a/recipes/macrobusiness.recipe +++ b/recipes/macrobusiness.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/magyar_nemzet.recipe b/recipes/magyar_nemzet.recipe index eee19ac1ac..1b7874dfd9 100644 --- a/recipes/magyar_nemzet.recipe +++ b/recipes/magyar_nemzet.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import AutomaticNewsRecipe diff --git a/recipes/mainichi.recipe b/recipes/mainichi.recipe index fb18a371f7..c04270fae9 100644 --- a/recipes/mainichi.recipe +++ b/recipes/mainichi.recipe @@ -5,6 +5,7 @@ www.mainichi.jp ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/mainichi_en.recipe b/recipes/mainichi_en.recipe index d49e960bb8..e22e310892 100644 --- a/recipes/mainichi_en.recipe +++ b/recipes/mainichi_en.recipe @@ -5,6 +5,7 @@ www.mainichi.jp/english from calibre.ptempfile import PersistentTemporaryFile from calibre.web.feeds.news import BasicNewsRecipe + class MainichiEnglishNews(BasicNewsRecipe): title = u"The Mainichi" __author__ = 'unkn0wn' diff --git a/recipes/mainichi_science_news.recipe b/recipes/mainichi_science_news.recipe index 531396c317..d7ede8543b 100644 --- a/recipes/mainichi_science_news.recipe +++ b/recipes/mainichi_science_news.recipe @@ -5,6 +5,7 @@ www.mainichi.jp ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/malaya_business_insight.recipe b/recipes/malaya_business_insight.recipe index 61f1c07dd6..1adbcb1b26 100644 --- a/recipes/malaya_business_insight.recipe +++ b/recipes/malaya_business_insight.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.recipes import BasicNewsRecipe import time +from calibre.web.feeds.recipes import BasicNewsRecipe + class MalayaBusinessInsight(BasicNewsRecipe): title = u'Malaya Business Insight' diff --git a/recipes/mandidner.recipe b/recipes/mandidner.recipe index 4ed55933c9..da8541dfc1 100644 --- a/recipes/mandidner.recipe +++ b/recipes/mandidner.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import AutomaticNewsRecipe diff --git a/recipes/manila_standard_today.recipe b/recipes/manila_standard_today.recipe index f2f5309a4d..965133d307 100644 --- a/recipes/manila_standard_today.recipe +++ b/recipes/manila_standard_today.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.recipes import BasicNewsRecipe import time +from calibre.web.feeds.recipes import BasicNewsRecipe + class ManilaStandardToday(BasicNewsRecipe): title = u'Manila Standard Today' diff --git a/recipes/marketing_sensoriale.recipe b/recipes/marketing_sensoriale.recipe index 8a9b13144f..d1b68ba6c8 100644 --- a/recipes/marketing_sensoriale.recipe +++ b/recipes/marketing_sensoriale.recipe @@ -1,6 +1,6 @@ -from calibre.web.feeds.news import BasicNewsRecipe -from calibre.utils.ipc.simple_worker import fork_job from calibre.ptempfile import PersistentTemporaryFile +from calibre.utils.ipc.simple_worker import fork_job +from calibre.web.feeds.news import BasicNewsRecipe js_fetcher = ''' diff --git a/recipes/martinfowler.recipe b/recipes/martinfowler.recipe index 419d4e1e25..f1742f954d 100644 --- a/recipes/martinfowler.recipe +++ b/recipes/martinfowler.recipe @@ -1,5 +1,6 @@ from calibre.web.feeds.news import BasicNewsRecipe + class MartinFowler(BasicNewsRecipe): title = 'Martin Fowler Blog' description = 'Software development is a young profession, and we are still learning the techniques and building the tools to do it effectively.' diff --git a/recipes/maskinbladet_dk.recipe b/recipes/maskinbladet_dk.recipe index 18be84dcfa..7755345bf6 100644 --- a/recipes/maskinbladet_dk.recipe +++ b/recipes/maskinbladet_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Maskinbladet.dk ''' diff --git a/recipes/media_zone.recipe b/recipes/media_zone.recipe index 03791f0494..a55d65d10d 100644 --- a/recipes/media_zone.recipe +++ b/recipes/media_zone.recipe @@ -1,7 +1,8 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/mediapart.recipe b/recipes/mediapart.recipe index 2606d284b0..16d98506cc 100644 --- a/recipes/mediapart.recipe +++ b/recipes/mediapart.recipe @@ -19,10 +19,12 @@ __copyright__ = '2021, Loïc Houpert . Adapted from: Mediapart ''' -from datetime import datetime, timezone, timedelta +from datetime import datetime, timedelta, timezone + from calibre.ptempfile import PersistentTemporaryFile from calibre.web.feeds.news import BasicNewsRecipe, classes + class Mediapart(BasicNewsRecipe): title = 'Mediapart' __author__ = 'Loïc Houpert, unkn0wn' @@ -107,8 +109,8 @@ class Mediapart(BasicNewsRecipe): ''' Create a generic cover for recipes that don't have a cover ''' - from qt.core import QImage, QPainter, QPen, Qt, QFont, QRect from calibre.gui2 import ensure_app, load_builtin_fonts, pixmap_to_data + from qt.core import QFont, QImage, QPainter, QPen, QRect, Qt def init_environment(): ensure_app() diff --git a/recipes/metro_news_nl.recipe b/recipes/metro_news_nl.recipe index 8e4e4a806b..c3e16c0b41 100644 --- a/recipes/metro_news_nl.recipe +++ b/recipes/metro_news_nl.recipe @@ -1,8 +1,10 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import print_function -from calibre.web.feeds.news import BasicNewsRecipe + import re + from calibre.utils.magick import Image +from calibre.web.feeds.news import BasicNewsRecipe ''' Version 1.2, updated cover image to match the changed website. added info date on title diff --git a/recipes/metro_uk.recipe b/recipes/metro_uk.recipe index 5a420fc126..22b02b9583 100644 --- a/recipes/metro_uk.recipe +++ b/recipes/metro_uk.recipe @@ -1,5 +1,7 @@ from __future__ import print_function + import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/metropol_tv.recipe b/recipes/metropol_tv.recipe index f300359c3c..6a2d6e9b88 100644 --- a/recipes/metropol_tv.recipe +++ b/recipes/metropol_tv.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/miesbacher_merkur.recipe b/recipes/miesbacher_merkur.recipe index c7ec188e6c..08e8bf7ee1 100644 --- a/recipes/miesbacher_merkur.recipe +++ b/recipes/miesbacher_merkur.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/mit_technology_review.recipe b/recipes/mit_technology_review.recipe index 7075655d74..709962c0ba 100644 --- a/recipes/mit_technology_review.recipe +++ b/recipes/mit_technology_review.recipe @@ -8,9 +8,11 @@ __copyright__ = '2015 Michael Marotta ' ''' technologyreview.com ''' -from calibre.web.feeds.news import BasicNewsRecipe, prefixed_classes -from collections import OrderedDict import json +from collections import OrderedDict + +from calibre.web.feeds.news import BasicNewsRecipe, prefixed_classes + def absurl(x): if x.startswith('//'): diff --git a/recipes/mlody_technik_pl.recipe b/recipes/mlody_technik_pl.recipe index 554fd26541..535f900ca8 100644 --- a/recipes/mlody_technik_pl.recipe +++ b/recipes/mlody_technik_pl.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/modoros.recipe b/recipes/modoros.recipe index c95738f9b2..a934eb8427 100644 --- a/recipes/modoros.recipe +++ b/recipes/modoros.recipe @@ -1,8 +1,10 @@ -import re -from calibre.web.feeds.recipes import BasicNewsRecipe -from calibre.constants import config_dir, CONFIG_DIR_MODE import os import os.path +import re + +from calibre.constants import CONFIG_DIR_MODE, config_dir +from calibre.web.feeds.recipes import BasicNewsRecipe + try: from urllib.parse import quote except ImportError: diff --git a/recipes/moneycontrol.recipe b/recipes/moneycontrol.recipe index 2d4f60f8b1..cf0b65e65e 100644 --- a/recipes/moneycontrol.recipe +++ b/recipes/moneycontrol.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes from urllib.parse import quote +from calibre.web.feeds.news import BasicNewsRecipe, classes + class MoneyControlRecipe(BasicNewsRecipe): title = u'Money Control' diff --git a/recipes/montreal_gazette.recipe b/recipes/montreal_gazette.recipe index 156ae3690d..6701af2093 100644 --- a/recipes/montreal_gazette.recipe +++ b/recipes/montreal_gazette.recipe @@ -1,14 +1,16 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function + __license__ = 'GPL v3' ''' www.canada.com ''' import re -from calibre.web.feeds.recipes import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.recipes import BasicNewsRecipe def new_tag(soup, name, attrs=()): @@ -142,7 +144,7 @@ class CanWestPaper(BasicNewsRecipe): dict(name='li', attrs={'class': 'print'}), dict(name='li', attrs={'class': 'share'}), dict(name='ul', attrs={'class': 'bullet'})] def get_cover_url(self): - from datetime import timedelta, date + from datetime import date, timedelta cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg' + \ str(date.today().day) + '/lg/' + self.fp_tag + '.jpg' br = BasicNewsRecipe.get_browser(self) diff --git a/recipes/motherjones.recipe b/recipes/motherjones.recipe index 9e026662a9..24052526e4 100644 --- a/recipes/motherjones.recipe +++ b/recipes/motherjones.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/msdnmag_en.recipe b/recipes/msdnmag_en.recipe index 96673964de..3b0191f750 100644 --- a/recipes/msdnmag_en.recipe +++ b/recipes/msdnmag_en.recipe @@ -5,8 +5,8 @@ __copyright__ = '2009, Darko Miletic ' ''' msdn.microsoft.com/en-us/magazine ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup, BeautifulStoneSoup +from calibre.web.feeds.news import BasicNewsRecipe class MSDNMagazine_en(BasicNewsRecipe): diff --git a/recipes/mult_kor.recipe b/recipes/mult_kor.recipe index abc67c22bd..50254a7c73 100644 --- a/recipes/mult_kor.recipe +++ b/recipes/mult_kor.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import AutomaticNewsRecipe diff --git a/recipes/munchner_merkur_nord.recipe b/recipes/munchner_merkur_nord.recipe index 6f428379a5..6f8ebac872 100644 --- a/recipes/munchner_merkur_nord.recipe +++ b/recipes/munchner_merkur_nord.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/munchner_merkur_stadt.recipe b/recipes/munchner_merkur_stadt.recipe index 398a0ebbae..d73994c055 100644 --- a/recipes/munchner_merkur_stadt.recipe +++ b/recipes/munchner_merkur_stadt.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/munchner_merkur_sud.recipe b/recipes/munchner_merkur_sud.recipe index 619decdc14..0a00ec7c67 100644 --- a/recipes/munchner_merkur_sud.recipe +++ b/recipes/munchner_merkur_sud.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/munchner_merkur_wurmtal.recipe b/recipes/munchner_merkur_wurmtal.recipe index 9bf4ce0543..2644d500fa 100644 --- a/recipes/munchner_merkur_wurmtal.recipe +++ b/recipes/munchner_merkur_wurmtal.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/murnauer_tagblatt.recipe b/recipes/murnauer_tagblatt.recipe index bb8555327a..2cf7cc59e9 100644 --- a/recipes/murnauer_tagblatt.recipe +++ b/recipes/murnauer_tagblatt.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/mwjournal.recipe b/recipes/mwjournal.recipe index 28d71dede9..d9ba4161b1 100644 --- a/recipes/mwjournal.recipe +++ b/recipes/mwjournal.recipe @@ -21,6 +21,7 @@ microwavejournal.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/my_dealz_de.recipe b/recipes/my_dealz_de.recipe index f5720ce7d5..f9a349a505 100644 --- a/recipes/my_dealz_de.recipe +++ b/recipes/my_dealz_de.recipe @@ -1,5 +1,5 @@ #!/usr/bin/env python -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/nachdenkseiten.recipe b/recipes/nachdenkseiten.recipe index a64d4837bf..4d87f0828a 100644 --- a/recipes/nachdenkseiten.recipe +++ b/recipes/nachdenkseiten.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/nacional_cro.recipe b/recipes/nacional_cro.recipe index fb088ee0e5..96d3a1d2f6 100644 --- a/recipes/nacional_cro.recipe +++ b/recipes/nacional_cro.recipe @@ -8,8 +8,9 @@ nacional.hr ''' import re -from calibre.web.feeds.recipes import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.recipes import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/nadacni_fond_proti_korupci.recipe b/recipes/nadacni_fond_proti_korupci.recipe index 7a271d7d9e..8d841d316e 100644 --- a/recipes/nadacni_fond_proti_korupci.recipe +++ b/recipes/nadacni_fond_proti_korupci.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/nasa.recipe b/recipes/nasa.recipe index 04ccb155c5..b1b5b5e7f8 100644 --- a/recipes/nasa.recipe +++ b/recipes/nasa.recipe @@ -25,6 +25,7 @@ Custom User Profile to download RSS News Feeds and Articles from Wired.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/natemat_pl.recipe b/recipes/natemat_pl.recipe index 0ed257f9e2..0fc12986e4 100644 --- a/recipes/natemat_pl.recipe +++ b/recipes/natemat_pl.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/natgeo.recipe b/recipes/natgeo.recipe index 40e3da9b8a..69ceeef02c 100644 --- a/recipes/natgeo.recipe +++ b/recipes/natgeo.recipe @@ -5,9 +5,9 @@ from __future__ import absolute_import, division, print_function, unicode_litera import json from pprint import pformat -from calibre.web.feeds.news import BasicNewsRecipe from calibre import prepare_string_for_xml as escape from calibre.utils.iso8601 import parse_iso8601 +from calibre.web.feeds.news import BasicNewsRecipe def classes(classes): diff --git a/recipes/natgeohis.recipe b/recipes/natgeohis.recipe index aee7c7caa0..1009102203 100644 --- a/recipes/natgeohis.recipe +++ b/recipes/natgeohis.recipe @@ -4,9 +4,9 @@ from __future__ import absolute_import, division, print_function, unicode_litera import json -from calibre.web.feeds.news import BasicNewsRecipe from calibre import prepare_string_for_xml as escape from calibre.utils.iso8601 import parse_iso8601 +from calibre.web.feeds.news import BasicNewsRecipe def classes(classes): diff --git a/recipes/natgeomag.recipe b/recipes/natgeomag.recipe index 0ad082923e..1df5c71618 100644 --- a/recipes/natgeomag.recipe +++ b/recipes/natgeomag.recipe @@ -6,9 +6,9 @@ import json from datetime import date from pprint import pformat -from calibre.web.feeds.news import BasicNewsRecipe from calibre import prepare_string_for_xml as escape from calibre.utils.iso8601 import parse_iso8601 +from calibre.web.feeds.news import BasicNewsRecipe edition = date.today().strftime('%B-%Y') diff --git a/recipes/nature.recipe b/recipes/nature.recipe index 5809737e0b..02c70c211a 100644 --- a/recipes/nature.recipe +++ b/recipes/nature.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python import re from collections import defaultdict + from calibre.web.feeds.news import BasicNewsRecipe, classes BASE = 'https://www.nature.com' diff --git a/recipes/nauka_w_polsce.recipe b/recipes/nauka_w_polsce.recipe index 707f8ccf3b..7b91b44c21 100644 --- a/recipes/nauka_w_polsce.recipe +++ b/recipes/nauka_w_polsce.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class NaukawPolsce(BasicNewsRecipe): title = u'PAP Nauka w Polsce' diff --git a/recipes/navalny.recipe b/recipes/navalny.recipe index 346fcfd15e..a1983b2e59 100644 --- a/recipes/navalny.recipe +++ b/recipes/navalny.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/ncrnext.recipe b/recipes/ncrnext.recipe index ec3087d9b4..d208a3ed87 100644 --- a/recipes/ncrnext.recipe +++ b/recipes/ncrnext.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup, Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/nepszabadsag.recipe b/recipes/nepszabadsag.recipe index 17459d59ba..a0b9f5279d 100644 --- a/recipes/nepszabadsag.recipe +++ b/recipes/nepszabadsag.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals + ''' Fetch Népszabadság ''' diff --git a/recipes/neviditelny_pes.recipe b/recipes/neviditelny_pes.recipe index 4b94a5be0d..36db2a74da 100644 --- a/recipes/neviditelny_pes.recipe +++ b/recipes/neviditelny_pes.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/new_scientist_mag.recipe b/recipes/new_scientist_mag.recipe index c1559e51e5..87d15cb44a 100644 --- a/recipes/new_scientist_mag.recipe +++ b/recipes/new_scientist_mag.recipe @@ -4,6 +4,7 @@ newscientist.com from calibre.web.feeds.news import BasicNewsRecipe, classes + class NewScientist(BasicNewsRecipe): title = 'New Scientist Magazine' __author__ = 'unkn0wn' diff --git a/recipes/new_yorker.recipe b/recipes/new_yorker.recipe index adaa5e398b..7a301aeb43 100644 --- a/recipes/new_yorker.recipe +++ b/recipes/new_yorker.recipe @@ -2,6 +2,7 @@ # vim:fileencoding=utf-8 # License: GPLv3 Copyright: 2016, Kovid Goyal from __future__ import absolute_import, division, print_function, unicode_literals + from collections import OrderedDict from calibre import browser diff --git a/recipes/newrepublicmag.recipe b/recipes/newrepublicmag.recipe index beb43200a6..01ede950a4 100644 --- a/recipes/newrepublicmag.recipe +++ b/recipes/newrepublicmag.recipe @@ -3,14 +3,13 @@ newrepublic.com """ import json from functools import cmp_to_key -from urllib.parse import urljoin, urlencode, urlsplit, urlparse +from urllib.parse import urlencode, urljoin, urlparse, urlsplit from calibre import iswindows from calibre.ebooks.BeautifulSoup import BeautifulSoup from calibre.utils.date import parse_date from calibre.web.feeds.news import BasicNewsRecipe - _issue_url = "" # example: https://newrepublic.com/magazine/may-2023 diff --git a/recipes/newslaundry.recipe b/recipes/newslaundry.recipe index 9873b60157..4fe4cf6996 100644 --- a/recipes/newslaundry.recipe +++ b/recipes/newslaundry.recipe @@ -1,5 +1,6 @@ from calibre.web.feeds.news import BasicNewsRecipe + class newslaundry(BasicNewsRecipe): title = 'Newslaundry' __author__ = 'unkn0wn' diff --git a/recipes/newsminute.recipe b/recipes/newsminute.recipe index ac675581a9..a4dd420d69 100644 --- a/recipes/newsminute.recipe +++ b/recipes/newsminute.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe, classes class newsminute(BasicNewsRecipe): diff --git a/recipes/newsweek_polska.recipe b/recipes/newsweek_polska.recipe index 5da8678792..af69641762 100644 --- a/recipes/newsweek_polska.recipe +++ b/recipes/newsweek_polska.recipe @@ -2,15 +2,17 @@ # -*- coding: utf-8 -*- from __future__ import print_function + __license__ = 'GPL v3' __copyright__ = '2010, matek09, matek09@gmail.com; 2012-2013, admroz, a.rozewicki@gmail.com' -import re -from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ptempfile import PersistentTemporaryFile -from string import capwords import datetime +import re +from string import capwords + from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe class Newsweek(BasicNewsRecipe): diff --git a/recipes/newz_dk.recipe b/recipes/newz_dk.recipe index f83c0af12a..84292d2d00 100644 --- a/recipes/newz_dk.recipe +++ b/recipes/newz_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' newz.dk ''' diff --git a/recipes/nightflier.recipe b/recipes/nightflier.recipe index a8686ffabc..b0da8454b5 100644 --- a/recipes/nightflier.recipe +++ b/recipes/nightflier.recipe @@ -6,6 +6,7 @@ nightfliersbookspace.blogspot.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/nikkei_news.recipe b/recipes/nikkei_news.recipe index b2788aecc9..e5f7fd204d 100644 --- a/recipes/nikkei_news.recipe +++ b/recipes/nikkei_news.recipe @@ -1,11 +1,12 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 from __future__ import print_function -from calibre.web.feeds.recipes import BasicNewsRecipe -import re +import re import unicodedata +from calibre.web.feeds.recipes import BasicNewsRecipe + # import pprint, sys # pp = pprint.PrettyPrinter(indent=4) diff --git a/recipes/nikkei_sub.recipe b/recipes/nikkei_sub.recipe index 19741388a2..ed098792f5 100644 --- a/recipes/nikkei_sub.recipe +++ b/recipes/nikkei_sub.recipe @@ -1,7 +1,8 @@ import re -from calibre.web.feeds.recipes import BasicNewsRecipe + import mechanize from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.recipes import BasicNewsRecipe class NikkeiNet_subscription(BasicNewsRecipe): diff --git a/recipes/nikkeiasia.recipe b/recipes/nikkeiasia.recipe index 74ffdc3ae6..eb8900ab18 100644 --- a/recipes/nikkeiasia.recipe +++ b/recipes/nikkeiasia.recipe @@ -1,5 +1,6 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes + def absurl(url): if url.startswith('/'): url = 'https://asia.nikkei.com' + url diff --git a/recipes/nin.recipe b/recipes/nin.recipe index ca0f9b7639..9727c1296a 100644 --- a/recipes/nin.recipe +++ b/recipes/nin.recipe @@ -6,6 +6,7 @@ www.nin.co.rs ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/njp.recipe b/recipes/njp.recipe index c2a21d4a11..37f3d0bb2d 100644 --- a/recipes/njp.recipe +++ b/recipes/njp.recipe @@ -20,6 +20,7 @@ njp.org ''' import re # Import the regular expressions module. + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/njuz_net.recipe b/recipes/njuz_net.recipe index c448429388..7db58348d5 100644 --- a/recipes/njuz_net.recipe +++ b/recipes/njuz_net.recipe @@ -5,6 +5,7 @@ __copyright__ = '2011, Darko Miletic ' njuz.net ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/noaa.recipe b/recipes/noaa.recipe index 0d653bb525..a04fc2c774 100644 --- a/recipes/noaa.recipe +++ b/recipes/noaa.recipe @@ -6,8 +6,8 @@ __copyright__ = '2009, Darko Miletic ' noaa.com ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/noerrebronordvestbladet_dk.recipe b/recipes/noerrebronordvestbladet_dk.recipe index dd6040ce33..cc26834a44 100644 --- a/recipes/noerrebronordvestbladet_dk.recipe +++ b/recipes/noerrebronordvestbladet_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Nørrebro Nordvest bladet ''' diff --git a/recipes/norddjurslokalavisen_dk.recipe b/recipes/norddjurslokalavisen_dk.recipe index b6d0d36d23..40ace922da 100644 --- a/recipes/norddjurslokalavisen_dk.recipe +++ b/recipes/norddjurslokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Norddjurs ''' diff --git a/recipes/nordjyske_dk.recipe b/recipes/nordjyske_dk.recipe index 72f86932e8..76a71e9454 100644 --- a/recipes/nordjyske_dk.recipe +++ b/recipes/nordjyske_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Nordjyske.dk ''' diff --git a/recipes/novilist_novine_hr.recipe b/recipes/novilist_novine_hr.recipe index 28fba97045..6939447607 100644 --- a/recipes/novilist_novine_hr.recipe +++ b/recipes/novilist_novine_hr.recipe @@ -5,6 +5,7 @@ novine.novilist.hr ''' import re + from calibre import strftime from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/novilist_portal_hr.recipe b/recipes/novilist_portal_hr.recipe index f45ae553a6..b902fd13f3 100644 --- a/recipes/novilist_portal_hr.recipe +++ b/recipes/novilist_portal_hr.recipe @@ -5,6 +5,7 @@ www.novilist.hr ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/novinky.cz.recipe b/recipes/novinky.cz.recipe index a1dd9b5e79..c30dc259d7 100644 --- a/recipes/novinky.cz.recipe +++ b/recipes/novinky.cz.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/novosti.recipe b/recipes/novosti.recipe index fee0c4d1b0..7a4d19f4d2 100644 --- a/recipes/novosti.recipe +++ b/recipes/novosti.recipe @@ -6,6 +6,7 @@ novosti.rs ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/nrc-nl-epub.recipe b/recipes/nrc-nl-epub.recipe index 1b1df7dc5f..a2edba32f2 100644 --- a/recipes/nrc-nl-epub.recipe +++ b/recipes/nrc-nl-epub.recipe @@ -10,10 +10,10 @@ www.nrc.nl ''' import os import zipfile +from datetime import date, timedelta from io import BytesIO from calibre.web.feeds.news import BasicNewsRecipe -from datetime import date, timedelta class NRCHandelsblad(BasicNewsRecipe): diff --git a/recipes/nrc.nl.recipe b/recipes/nrc.nl.recipe index 5954092a61..880f2b427d 100644 --- a/recipes/nrc.nl.recipe +++ b/recipes/nrc.nl.recipe @@ -1,10 +1,11 @@ #!/usr/bin/env python -from calibre.web.feeds.recipes import BasicNewsRecipe import datetime import json -from mechanize import Request -from contextlib import closing import re +from contextlib import closing + +from calibre.web.feeds.recipes import BasicNewsRecipe +from mechanize import Request class NRC(BasicNewsRecipe): diff --git a/recipes/nrc_next.recipe b/recipes/nrc_next.recipe index c8df70e3e2..42886190d2 100644 --- a/recipes/nrc_next.recipe +++ b/recipes/nrc_next.recipe @@ -10,12 +10,12 @@ __copyright__ = '2014 Niels Giesen' www.nrc.nl ''' import os -import zipfile import re +import zipfile +from datetime import date, timedelta from io import BytesIO from calibre.web.feeds.news import BasicNewsRecipe -from datetime import date, timedelta class NRCNext(BasicNewsRecipe): diff --git a/recipes/nspm.recipe b/recipes/nspm.recipe index ca1089ff7e..2b89b3a604 100644 --- a/recipes/nspm.recipe +++ b/recipes/nspm.recipe @@ -5,8 +5,9 @@ nspm.rs ''' import re -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import NavigableString, Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/nypost.recipe b/recipes/nypost.recipe index 24c5837a79..7811b481b5 100644 --- a/recipes/nypost.recipe +++ b/recipes/nypost.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/nytimes.recipe b/recipes/nytimes.recipe index d11c5cc92a..36b6ad1a5e 100644 --- a/recipes/nytimes.recipe +++ b/recipes/nytimes.recipe @@ -3,6 +3,7 @@ # License: GPLv3 Copyright: 2018, Kovid Goyal from __future__ import absolute_import, division, print_function, unicode_literals + import datetime import json import re diff --git a/recipes/nytimes_sports.recipe b/recipes/nytimes_sports.recipe index 40d93ead24..2ad3c65387 100644 --- a/recipes/nytimes_sports.recipe +++ b/recipes/nytimes_sports.recipe @@ -2,6 +2,7 @@ # encoding: utf-8 from __future__ import with_statement + __license__ = 'GPL 3' __copyright__ = 'zotzo' __docformat__ = 'restructuredtext en' diff --git a/recipes/nytimes_sub.recipe b/recipes/nytimes_sub.recipe index 36455d2d83..93b65b4a08 100644 --- a/recipes/nytimes_sub.recipe +++ b/recipes/nytimes_sub.recipe @@ -3,6 +3,7 @@ # License: GPLv3 Copyright: 2018, Kovid Goyal from __future__ import absolute_import, division, print_function, unicode_literals + import datetime import json import re diff --git a/recipes/nytimes_tech.recipe b/recipes/nytimes_tech.recipe index d31e6f346f..aa126169bc 100644 --- a/recipes/nytimes_tech.recipe +++ b/recipes/nytimes_tech.recipe @@ -2,6 +2,7 @@ # encoding: utf-8 from __future__ import with_statement + __license__ = 'GPL 3' __copyright__ = 'zotzo' __docformat__ = 'restructuredtext en' diff --git a/recipes/nzz_ger.recipe b/recipes/nzz_ger.recipe index 163a0158ed..fd16eac5f0 100644 --- a/recipes/nzz_ger.recipe +++ b/recipes/nzz_ger.recipe @@ -1,8 +1,8 @@ import json -from mechanize import Request from datetime import datetime from calibre.web.feeds.recipes import BasicNewsRecipe +from mechanize import Request class Nzz(BasicNewsRecipe): diff --git a/recipes/oakland_north.recipe b/recipes/oakland_north.recipe index 103b1384b7..8504fa2139 100644 --- a/recipes/oakland_north.recipe +++ b/recipes/oakland_north.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class AdvancedUserRecipe1299640653(BasicNewsRecipe): title = u'Oakland North' diff --git a/recipes/oba.recipe b/recipes/oba.recipe index 476ea690e9..6e9a4fec12 100644 --- a/recipes/oba.recipe +++ b/recipes/oba.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/observa_digital.recipe b/recipes/observa_digital.recipe index 5b603bfbe8..c25c5e5cfd 100644 --- a/recipes/observa_digital.recipe +++ b/recipes/observa_digital.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python from __future__ import print_function + __license__ = 'GPL v3' __author__ = '2010, Gustavo Azambuja ' ''' diff --git a/recipes/observatorul_cultural.recipe b/recipes/observatorul_cultural.recipe index 6f786b199e..4c91f8859e 100644 --- a/recipes/observatorul_cultural.recipe +++ b/recipes/observatorul_cultural.recipe @@ -1,6 +1,9 @@ from __future__ import print_function + import re + from calibre.web.feeds.news import BasicNewsRecipe + coverpage = None diff --git a/recipes/observer_reach_foundation.recipe b/recipes/observer_reach_foundation.recipe index c1b88a6ea6..a2283d154d 100644 --- a/recipes/observer_reach_foundation.recipe +++ b/recipes/observer_reach_foundation.recipe @@ -1,5 +1,6 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes + class ORF(BasicNewsRecipe): title = u'Observer Research Foundation' description = ( diff --git a/recipes/oc_register.recipe b/recipes/oc_register.recipe index 96faf0f15d..9e8fda9eb7 100644 --- a/recipes/oc_register.recipe +++ b/recipes/oc_register.recipe @@ -1,8 +1,9 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function -import time +from __future__ import absolute_import, division, print_function, unicode_literals + import json +import time from pprint import pprint from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/odenselokalavisen_dk.recipe b/recipes/odenselokalavisen_dk.recipe index 77579d6bbf..14a81fb348 100644 --- a/recipes/odenselokalavisen_dk.recipe +++ b/recipes/odenselokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Odense ''' diff --git a/recipes/oesterbroavis_dk.recipe b/recipes/oesterbroavis_dk.recipe index a598d43bce..78ae5e88fc 100644 --- a/recipes/oesterbroavis_dk.recipe +++ b/recipes/oesterbroavis_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Østerbro Avis ''' diff --git a/recipes/office_space.recipe b/recipes/office_space.recipe index ccaad95fc6..5456a0e297 100644 --- a/recipes/office_space.recipe +++ b/recipes/office_space.recipe @@ -1,8 +1,10 @@ -import re -from calibre.web.feeds.recipes import BasicNewsRecipe -from calibre.constants import config_dir, CONFIG_DIR_MODE import os import os.path +import re + +from calibre.constants import CONFIG_DIR_MODE, config_dir +from calibre.web.feeds.recipes import BasicNewsRecipe + try: from urllib.parse import quote except ImportError: diff --git a/recipes/oregonian.recipe b/recipes/oregonian.recipe index d1dddd8330..da42c181ba 100644 --- a/recipes/oregonian.recipe +++ b/recipes/oregonian.recipe @@ -1,11 +1,13 @@ from __future__ import with_statement + __license__ = 'GPL 3' __copyright__ = 'zotzot' __docformat__ = 'restructuredtext en' -from calibre.web.feeds.news import BasicNewsRecipe from datetime import date +from calibre.web.feeds.news import BasicNewsRecipe + class Oregonian(BasicNewsRecipe): title = u'The Oregonian' diff --git a/recipes/oreilly_premium.recipe b/recipes/oreilly_premium.recipe index cac531b20e..3d35c3ffaf 100644 --- a/recipes/oreilly_premium.recipe +++ b/recipes/oreilly_premium.recipe @@ -1,17 +1,16 @@ from __future__ import print_function -import time -import traceback -# above for debugging via stack -from calibre.web.feeds.recipes import BasicNewsRecipe -# Allows the Python soup converter, which makes parsing easier. -from calibre.ebooks.BeautifulSoup import BeautifulSoup import os +import time +import traceback - +# Allows the Python soup converter, which makes parsing easier. +from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.utils.threadpool import NoResultsPending, ThreadPool, WorkRequest from calibre.web.feeds import feeds_from_index -from calibre.utils.threadpool import WorkRequest, ThreadPool, NoResultsPending +# above for debugging via stack +from calibre.web.feeds.recipes import BasicNewsRecipe # To Do: strip ads and graphics, Current Column lacks a title. # The News letter archive https://www.billoreilly.com/newsletterarchive is covered by other entries. diff --git a/recipes/orlando_sentinel.recipe b/recipes/orlando_sentinel.recipe index 24b05d4ca0..c1b0bad601 100644 --- a/recipes/orlando_sentinel.recipe +++ b/recipes/orlando_sentinel.recipe @@ -1,4 +1,5 @@ import re + try: from urllib.parse import unquote except ImportError: diff --git a/recipes/osel_cz.recipe b/recipes/osel_cz.recipe index 7f055b602b..6cbf1d5fb5 100644 --- a/recipes/osel_cz.recipe +++ b/recipes/osel_cz.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/ottawa_citizen.recipe b/recipes/ottawa_citizen.recipe index 2e76ca3627..7b0b152767 100644 --- a/recipes/ottawa_citizen.recipe +++ b/recipes/ottawa_citizen.recipe @@ -1,14 +1,16 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function + __license__ = 'GPL v3' ''' www.canada.com ''' import re -from calibre.web.feeds.recipes import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.recipes import BasicNewsRecipe def new_tag(soup, name, attrs=()): @@ -142,7 +144,7 @@ class CanWestPaper(BasicNewsRecipe): dict(name='li', attrs={'class': 'print'}), dict(name='li', attrs={'class': 'share'}), dict(name='ul', attrs={'class': 'bullet'})] def get_cover_url(self): - from datetime import timedelta, date + from datetime import date, timedelta cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg' + \ str(date.today().day) + '/lg/' + self.fp_tag + '.jpg' br = BasicNewsRecipe.get_browser(self) diff --git a/recipes/ourdailybread.recipe b/recipes/ourdailybread.recipe index e07cc03b8f..ac3785ae12 100644 --- a/recipes/ourdailybread.recipe +++ b/recipes/ourdailybread.recipe @@ -5,8 +5,9 @@ __copyright__ = '2009-2010, Darko Miletic ' odb.org ''' -from calibre.web.feeds.news import BasicNewsRecipe import uuid + +from calibre.web.feeds.news import BasicNewsRecipe from lxml import html diff --git a/recipes/pagina12.recipe b/recipes/pagina12.recipe index dddf29bef0..1325678e6f 100644 --- a/recipes/pagina12.recipe +++ b/recipes/pagina12.recipe @@ -7,8 +7,8 @@ __copyright__ = '2008-2018, Darko Miletic ' pagina12.com.ar ''' from calibre import strftime -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe class Pagina12(BasicNewsRecipe): diff --git a/recipes/pagina_12_print_ed.recipe b/recipes/pagina_12_print_ed.recipe index 4cb6eed6c1..36e16b62f8 100644 --- a/recipes/pagina_12_print_ed.recipe +++ b/recipes/pagina_12_print_ed.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python from __future__ import print_function + __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal ' ''' @@ -8,8 +9,8 @@ pagina12.com.ar ''' import re +from calibre.ebooks.BeautifulSoup import NavigableString, Tag from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import Tag, NavigableString def new_tag(soup, name, attrs=()): diff --git a/recipes/paperli_topic.recipe b/recipes/paperli_topic.recipe index 542015ae36..6128ed3d13 100644 --- a/recipes/paperli_topic.recipe +++ b/recipes/paperli_topic.recipe @@ -4,8 +4,8 @@ __copyright__ = '2010, Hiroshi Miura ' paperli ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre import strftime +from calibre.web.feeds.news import BasicNewsRecipe class paperli_topics(BasicNewsRecipe): diff --git a/recipes/parlamentni_listy.recipe b/recipes/parlamentni_listy.recipe index 81cf4db855..27bd17b4e3 100644 --- a/recipes/parlamentni_listy.recipe +++ b/recipes/parlamentni_listy.recipe @@ -1,8 +1,10 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals -from calibre.web.feeds.recipes import BasicNewsRecipe + import re +from calibre.web.feeds.recipes import BasicNewsRecipe + class plRecipe(BasicNewsRecipe): __author__ = 'bubak' diff --git a/recipes/patente_de_corso.recipe b/recipes/patente_de_corso.recipe index 874b4b2d2a..7c5d1af253 100644 --- a/recipes/patente_de_corso.recipe +++ b/recipes/patente_de_corso.recipe @@ -4,6 +4,7 @@ __copyright__ = '2011, Oscar Megia Lopez' perezreverte.com ''' import re + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/pc_foster.recipe b/recipes/pc_foster.recipe index 6e3e7709ba..d73fa0cea4 100644 --- a/recipes/pc_foster.recipe +++ b/recipes/pc_foster.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Comment +from calibre.web.feeds.news import BasicNewsRecipe # currently recipe is not working diff --git a/recipes/pc_lab.recipe b/recipes/pc_lab.recipe index 1f5973366a..02b3a86a8c 100644 --- a/recipes/pc_lab.recipe +++ b/recipes/pc_lab.recipe @@ -1,7 +1,8 @@ #!/usr/bin/env python import re -from calibre.web.feeds.recipes import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Comment +from calibre.web.feeds.recipes import BasicNewsRecipe class PCLab(BasicNewsRecipe): diff --git a/recipes/penzberger_merkur.recipe b/recipes/penzberger_merkur.recipe index 67aa45d757..e1e9965d9b 100644 --- a/recipes/penzberger_merkur.recipe +++ b/recipes/penzberger_merkur.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/people_daily.recipe b/recipes/people_daily.recipe index d7912931e0..26881d67cb 100644 --- a/recipes/people_daily.recipe +++ b/recipes/people_daily.recipe @@ -1,9 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from calibre.web.feeds.news import BasicNewsRecipe import os import time +from calibre.web.feeds.news import BasicNewsRecipe + class AdvancedUserRecipe1277129332(BasicNewsRecipe): title = u'人民日报' diff --git a/recipes/periodismo_humano_es.recipe b/recipes/periodismo_humano_es.recipe index 3cf554596d..85df9d6eb6 100644 --- a/recipes/periodismo_humano_es.recipe +++ b/recipes/periodismo_humano_es.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/pescanik.recipe b/recipes/pescanik.recipe index f9ef3e81b3..985568768b 100644 --- a/recipes/pescanik.recipe +++ b/recipes/pescanik.recipe @@ -6,6 +6,7 @@ pescanik.net ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/philippino_star_ngayon.recipe b/recipes/philippino_star_ngayon.recipe index 6d02f8d8d9..dec5ef1a28 100644 --- a/recipes/philippino_star_ngayon.recipe +++ b/recipes/philippino_star_ngayon.recipe @@ -4,6 +4,7 @@ www.philstar.com ''' import time + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/phillosophy_now.recipe b/recipes/phillosophy_now.recipe index 350a57b4f0..2a46dcf0eb 100644 --- a/recipes/phillosophy_now.recipe +++ b/recipes/phillosophy_now.recipe @@ -1,7 +1,8 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes -from calibre import browser from collections import OrderedDict +from calibre import browser +from calibre.web.feeds.news import BasicNewsRecipe, classes + class PhilosophyNow(BasicNewsRecipe): diff --git a/recipes/physics_today.recipe b/recipes/physics_today.recipe index f63c6a4d56..40fb37c017 100644 --- a/recipes/physics_today.recipe +++ b/recipes/physics_today.recipe @@ -1,6 +1,7 @@ import re -from calibre.web.feeds.news import BasicNewsRecipe + from calibre import strftime +from calibre.web.feeds.news import BasicNewsRecipe class Physicstoday(BasicNewsRecipe): diff --git a/recipes/physics_world.recipe b/recipes/physics_world.recipe index ef865e4d58..8d4e82adaa 100644 --- a/recipes/physics_world.recipe +++ b/recipes/physics_world.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/piratska_strana.recipe b/recipes/piratska_strana.recipe index 2e05a6229f..d034932edd 100644 --- a/recipes/piratska_strana.recipe +++ b/recipes/piratska_strana.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/piratske_noviny.recipe b/recipes/piratske_noviny.recipe index 5970e562fe..2ae473c6bc 100644 --- a/recipes/piratske_noviny.recipe +++ b/recipes/piratske_noviny.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/pobjeda.recipe b/recipes/pobjeda.recipe index f6bec0eca5..2aab9545b6 100644 --- a/recipes/pobjeda.recipe +++ b/recipes/pobjeda.recipe @@ -8,9 +8,10 @@ pobjeda.co.me ''' import re + from calibre import strftime -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/poliitico_eu.recipe b/recipes/poliitico_eu.recipe index 9f16c40a36..a5b602173e 100644 --- a/recipes/poliitico_eu.recipe +++ b/recipes/poliitico_eu.recipe @@ -7,8 +7,10 @@ politico.eu ''' import re + from calibre.web.feeds.news import BasicNewsRecipe + class Politico(BasicNewsRecipe): title = 'Politico.eu' diff --git a/recipes/politika.recipe b/recipes/politika.recipe index f46c664fe3..f802500d0a 100644 --- a/recipes/politika.recipe +++ b/recipes/politika.recipe @@ -4,6 +4,7 @@ __copyright__ = '2008-2013, Darko Miletic ' politika.rs ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/politiko_dk.recipe b/recipes/politiko_dk.recipe index 816be563eb..5d5228c6c3 100644 --- a/recipes/politiko_dk.recipe +++ b/recipes/politiko_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Politiko.dk ''' diff --git a/recipes/polter_pl.recipe b/recipes/polter_pl.recipe index db0fe58b77..ada19901fd 100644 --- a/recipes/polter_pl.recipe +++ b/recipes/polter_pl.recipe @@ -1,5 +1,6 @@ __license__ = 'GPL v3' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/pravda_rs.recipe b/recipes/pravda_rs.recipe index 1dc12aec16..c002253e8a 100644 --- a/recipes/pravda_rs.recipe +++ b/recipes/pravda_rs.recipe @@ -8,6 +8,7 @@ www.pravda.rs ''' import re + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/pravda_ru.recipe b/recipes/pravda_ru.recipe index a92c1b49b3..e8d37dacde 100644 --- a/recipes/pravda_ru.recipe +++ b/recipes/pravda_ru.recipe @@ -1,7 +1,8 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe __license__ = 'GPL v3' diff --git a/recipes/pravda_uk.recipe b/recipes/pravda_uk.recipe index 9541298c1b..32ffbeb26c 100644 --- a/recipes/pravda_uk.recipe +++ b/recipes/pravda_uk.recipe @@ -1,7 +1,8 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/presse_portal.recipe b/recipes/presse_portal.recipe index c2e069ec5e..71f398f87b 100644 --- a/recipes/presse_portal.recipe +++ b/recipes/presse_portal.recipe @@ -1,9 +1,11 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function -from calibre.web.feeds.news import BasicNewsRecipe +from __future__ import absolute_import, division, print_function, unicode_literals + from datetime import datetime +from calibre.web.feeds.news import BasicNewsRecipe + class PressePortalDE(BasicNewsRecipe): # Title of the Recipe diff --git a/recipes/pressonline.recipe b/recipes/pressonline.recipe index c2fbb1ac02..e8863fb0d9 100644 --- a/recipes/pressonline.recipe +++ b/recipes/pressonline.recipe @@ -8,8 +8,9 @@ pressonline.rs ''' import re -from calibre.web.feeds.recipes import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.recipes import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/private_eye.recipe b/recipes/private_eye.recipe index 8ddda8392d..5881eb5b90 100644 --- a/recipes/private_eye.recipe +++ b/recipes/private_eye.recipe @@ -3,9 +3,11 @@ Fetch Private Eye (Online Edition) ''' import re -from calibre.web.feeds.news import BasicNewsRecipe from datetime import datetime, timedelta +from calibre.web.feeds.news import BasicNewsRecipe + + class PrivateEyeRecipe(BasicNewsRecipe): ## # Last Edited: 2023-07-14 diff --git a/recipes/pro_physik.recipe b/recipes/pro_physik.recipe index 83b809c4ec..ab9474179c 100644 --- a/recipes/pro_physik.recipe +++ b/recipes/pro_physik.recipe @@ -5,6 +5,8 @@ ## from calibre.web.feeds.recipes import BasicNewsRecipe + + class AdvancedUserRecipe1303841067(BasicNewsRecipe): title = u'Pro Physik' diff --git a/recipes/project_syndicate.recipe b/recipes/project_syndicate.recipe index 1596793425..e6addd446f 100644 --- a/recipes/project_syndicate.recipe +++ b/recipes/project_syndicate.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe -from calibre.scraper.simple import read_url from calibre.ptempfile import PersistentTemporaryFile +from calibre.scraper.simple import read_url +from calibre.web.feeds.news import BasicNewsRecipe + class projectsynd(BasicNewsRecipe): title = 'Project Syndicate' diff --git a/recipes/prosleduet.recipe b/recipes/prosleduet.recipe index 755cf43956..c65b88d381 100644 --- a/recipes/prosleduet.recipe +++ b/recipes/prosleduet.recipe @@ -1,9 +1,11 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + class ProSleduet(BasicNewsRecipe): title = '\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u043D\u0438\u0435 \u0441\u043B\u0435\u0434\u0443\u0435\u0442' __author__ = 'bugmen00t' diff --git a/recipes/publicdomainreview_org.recipe b/recipes/publicdomainreview_org.recipe index 316e69ab66..e37c37b5b1 100644 --- a/recipes/publicdomainreview_org.recipe +++ b/recipes/publicdomainreview_org.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class PublicDomainReview(BasicNewsRecipe): title = 'The Public Domain Review' diff --git a/recipes/publico.recipe b/recipes/publico.recipe index d79c9d28a2..f450f2629e 100644 --- a/recipes/publico.recipe +++ b/recipes/publico.recipe @@ -9,6 +9,7 @@ publico.pt ''' from calibre.web.feeds.news import BasicNewsRecipe + from polyglot.urllib import urlencode diff --git a/recipes/quanta_magazine.recipe b/recipes/quanta_magazine.recipe index eaf08f5f22..404b7d5a50 100644 --- a/recipes/quanta_magazine.recipe +++ b/recipes/quanta_magazine.recipe @@ -1,7 +1,8 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/queleer.recipe b/recipes/queleer.recipe index 642f1aec85..e846b62303 100644 --- a/recipes/queleer.recipe +++ b/recipes/queleer.recipe @@ -5,6 +5,7 @@ www.que-leer.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/queueacmorg.recipe b/recipes/queueacmorg.recipe index 2ac0b39cfa..74f5ab1697 100644 --- a/recipes/queueacmorg.recipe +++ b/recipes/queueacmorg.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' ACM Queue Magazine ''' diff --git a/recipes/rabble_ca.recipe b/recipes/rabble_ca.recipe index 7158167953..7d8d9db4fe 100644 --- a/recipes/rabble_ca.recipe +++ b/recipes/rabble_ca.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class RabbleCa(BasicNewsRecipe): title = u'Rabble.ca' diff --git a/recipes/radio_canada.recipe b/recipes/radio_canada.recipe index 1c63df5fbe..ced3352a7c 100644 --- a/recipes/radio_canada.recipe +++ b/recipes/radio_canada.recipe @@ -14,6 +14,7 @@ https://ici.radio-canada.ca/rss/ from calibre.web.feeds.news import BasicNewsRecipe + def classes(classes): q = frozenset(classes.split(' ')) return dict(attrs={ diff --git a/recipes/randerslokalavisen_dk.recipe b/recipes/randerslokalavisen_dk.recipe index bc69ed00f0..8d88d75e8c 100644 --- a/recipes/randerslokalavisen_dk.recipe +++ b/recipes/randerslokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Din avis Randers ''' diff --git a/recipes/readitlater.recipe b/recipes/readitlater.recipe index d8b291e243..43c8c8211c 100644 --- a/recipes/readitlater.recipe +++ b/recipes/readitlater.recipe @@ -1,10 +1,12 @@ """ Pocket Calibre Recipe v1.5 """ -from calibre import strftime -from calibre.web.feeds.news import BasicNewsRecipe import json import operator + +from calibre import strftime +from calibre.web.feeds.news import BasicNewsRecipe + try: from urllib.error import HTTPError, URLError except ImportError: diff --git a/recipes/real_clear.recipe b/recipes/real_clear.recipe index 750ab92073..a2031e8b7b 100644 --- a/recipes/real_clear.recipe +++ b/recipes/real_clear.recipe @@ -1,10 +1,13 @@ from __future__ import print_function + # Test with "\Program Files\Calibre2\ebook-convert.exe" RealClear.recipe # .epub --test -vv --debug-pipeline debug import re import time -from calibre.web.feeds.recipes import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import NavigableString +from calibre.web.feeds.recipes import BasicNewsRecipe + try: from urllib.parse import urlparse except ImportError: diff --git a/recipes/reason_magazine.recipe b/recipes/reason_magazine.recipe index c755d8576a..e419dfb9fd 100644 --- a/recipes/reason_magazine.recipe +++ b/recipes/reason_magazine.recipe @@ -2,6 +2,7 @@ # vim:fileencoding=utf-8 # License: GPLv3 Copyright: 2015, Kovid Goyal from __future__ import unicode_literals + import json from calibre import prepare_string_for_xml diff --git a/recipes/rebelion.recipe b/recipes/rebelion.recipe index 8a18c55b15..88395fb91f 100644 --- a/recipes/rebelion.recipe +++ b/recipes/rebelion.recipe @@ -1,9 +1,10 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class RebelionRecipe (BasicNewsRecipe): # Thanks to atlantique http://www.mobileread.com/forums/member.php?u=67876 diff --git a/recipes/red_voltaire.recipe b/recipes/red_voltaire.recipe index 2de9949bb8..e77e0c4460 100644 --- a/recipes/red_voltaire.recipe +++ b/recipes/red_voltaire.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/regina_leader_post.recipe b/recipes/regina_leader_post.recipe index 088c5d20f7..d3ff8ef484 100644 --- a/recipes/regina_leader_post.recipe +++ b/recipes/regina_leader_post.recipe @@ -8,6 +8,7 @@ www.canada.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe @@ -100,7 +101,7 @@ class CanWestPaper(BasicNewsRecipe): dict(name='li', attrs={'class': 'print'}), dict(name='li', attrs={'class': 'share'}), dict(name='ul', attrs={'class': 'bullet'})] def get_cover_url(self): - from datetime import timedelta, date + from datetime import date, timedelta if self.fp_tag == '': return None cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg' + \ diff --git a/recipes/republika.recipe b/recipes/republika.recipe index 98ff77195b..0e4810b155 100644 --- a/recipes/republika.recipe +++ b/recipes/republika.recipe @@ -8,6 +8,7 @@ republika.co.yu ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/respekt_magazine.recipe b/recipes/respekt_magazine.recipe index c9256aae49..93f007ac1e 100644 --- a/recipes/respekt_magazine.recipe +++ b/recipes/respekt_magazine.recipe @@ -7,11 +7,13 @@ __license__ = 'GNU General Public License v3 - http://www.gnu.org/copyleft/g __copyright__ = 'tomashnyk@gmail.com' import re -from calibre.web.feeds.recipes import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import BeautifulSoup + # This imports the version bundled with Calibre import lxml +from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.recipes import BasicNewsRecipe from lxml.builder import E + respekt_url = 'https://www.respekt.cz' diff --git a/recipes/reuters.recipe b/recipes/reuters.recipe index 5156ec4f35..ae52d6f406 100644 --- a/recipes/reuters.recipe +++ b/recipes/reuters.recipe @@ -5,6 +5,7 @@ from __future__ import absolute_import, division, print_function, unicode_literals import json + from calibre.web.feeds.news import BasicNewsRecipe country = 'us' diff --git a/recipes/revista_muy.recipe b/recipes/revista_muy.recipe index f9936686b1..c9153493c1 100644 --- a/recipes/revista_muy.recipe +++ b/recipes/revista_muy.recipe @@ -1,6 +1,6 @@ +from calibre.ebooks.BeautifulSoup import Tag from calibre.web.feeds.news import re from calibre.web.feeds.recipes import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import Tag def new_tag(soup, name, attrs=()): diff --git a/recipes/rmf24_ESKN.recipe b/recipes/rmf24_ESKN.recipe index c43a216e2d..deff2780ca 100644 --- a/recipes/rmf24_ESKN.recipe +++ b/recipes/rmf24_ESKN.recipe @@ -7,6 +7,7 @@ rmf24.pl ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/rmf24_fakty.recipe b/recipes/rmf24_fakty.recipe index d7809314e5..a718af5b4f 100644 --- a/recipes/rmf24_fakty.recipe +++ b/recipes/rmf24_fakty.recipe @@ -7,6 +7,7 @@ rmf24.pl ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/rmf24_opinie.recipe b/recipes/rmf24_opinie.recipe index eb5391a746..f85a677b6b 100644 --- a/recipes/rmf24_opinie.recipe +++ b/recipes/rmf24_opinie.recipe @@ -7,6 +7,7 @@ rmf24.pl ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/roger_ebert.recipe b/recipes/roger_ebert.recipe index 834c8dad1a..689a631eb8 100644 --- a/recipes/roger_ebert.recipe +++ b/recipes/roger_ebert.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/roger_ebert_blog.recipe b/recipes/roger_ebert_blog.recipe index 7dae6f5d93..fc7aa2230f 100644 --- a/recipes/roger_ebert_blog.recipe +++ b/recipes/roger_ebert_blog.recipe @@ -1,7 +1,8 @@ import re import time -from calibre.web.feeds.news import BasicNewsRecipe + from calibre import strftime +from calibre.web.feeds.news import BasicNewsRecipe ''' Help Needed: diff --git a/recipes/root.recipe b/recipes/root.recipe index 08a1930717..61a2f2c025 100644 --- a/recipes/root.recipe +++ b/recipes/root.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/roskildelokalavisen_dk.recipe b/recipes/roskildelokalavisen_dk.recipe index 9aa6ad7dd0..64e32346d1 100644 --- a/recipes/roskildelokalavisen_dk.recipe +++ b/recipes/roskildelokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Roskilde Avis ''' diff --git a/recipes/rtnews.recipe b/recipes/rtnews.recipe index 76137bbfdc..a9a7fcef7c 100644 --- a/recipes/rtnews.recipe +++ b/recipes/rtnews.recipe @@ -4,6 +4,7 @@ rt.com from calibre.web.feeds.news import BasicNewsRecipe, classes + class RT_eng(BasicNewsRecipe): title = 'Russia Today' __author__ = 'unkn0wn' diff --git a/recipes/rts.recipe b/recipes/rts.recipe index 09293b8653..70df0a64a1 100644 --- a/recipes/rts.recipe +++ b/recipes/rts.recipe @@ -8,8 +8,9 @@ www.rts.rs ''' import re -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/rubikon_de.recipe b/recipes/rubikon_de.recipe index 279d932aed..3dce614ff9 100644 --- a/recipes/rubikon_de.recipe +++ b/recipes/rubikon_de.recipe @@ -1,4 +1,5 @@ -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/rudersdallokalavisen_dk.recipe b/recipes/rudersdallokalavisen_dk.recipe index 9f1949a71e..0ac78fbd2d 100644 --- a/recipes/rudersdallokalavisen_dk.recipe +++ b/recipes/rudersdallokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Rudersdal Avis ''' diff --git a/recipes/rue89.recipe b/recipes/rue89.recipe index 0fb26d60b9..4ef4166790 100644 --- a/recipes/rue89.recipe +++ b/recipes/rue89.recipe @@ -7,6 +7,7 @@ Rue89 __author__ = '2010-2012, Louis Gesbert ' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/sa_gazeta.recipe b/recipes/sa_gazeta.recipe index bd067c980d..aa465b530a 100644 --- a/recipes/sa_gazeta.recipe +++ b/recipes/sa_gazeta.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import AutomaticNewsRecipe diff --git a/recipes/saechsische.recipe b/recipes/saechsische.recipe index dee96ba5e7..9dcc6558c8 100644 --- a/recipes/saechsische.recipe +++ b/recipes/saechsische.recipe @@ -4,7 +4,7 @@ ## Version: 1.1 ## Last update: 2023-03-31 ## -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals ''' Fetch RSS-Feeds from saechsische.de @@ -12,6 +12,7 @@ Fetch RSS-Feeds from saechsische.de from calibre.web.feeds.news import BasicNewsRecipe + def classes(classes): q = frozenset(classes.split(' ')) return dict(attrs={'class': lambda x: x and frozenset(x.split()).intersection(q)}) diff --git a/recipes/salon.recipe b/recipes/salon.recipe index 9a47299b91..afd05d6b13 100644 --- a/recipes/salon.recipe +++ b/recipes/salon.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/sarajevo_x.recipe b/recipes/sarajevo_x.recipe index 21524ecab6..c5a97b369c 100644 --- a/recipes/sarajevo_x.recipe +++ b/recipes/sarajevo_x.recipe @@ -6,8 +6,9 @@ sarajevo-x.com ''' import re + +from calibre.ebooks.BeautifulSoup import NavigableString, Tag from calibre.web.feeds.recipes import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import Tag, NavigableString def new_tag(soup, name, attrs=()): diff --git a/recipes/sardinia_post.recipe b/recipes/sardinia_post.recipe index e93a779f27..3a4b902f6c 100644 --- a/recipes/sardinia_post.recipe +++ b/recipes/sardinia_post.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import AutomaticNewsRecipe diff --git a/recipes/saskatoon_star_phoenix.recipe b/recipes/saskatoon_star_phoenix.recipe index 27961f1259..6592ef51aa 100644 --- a/recipes/saskatoon_star_phoenix.recipe +++ b/recipes/saskatoon_star_phoenix.recipe @@ -8,6 +8,7 @@ www.canada.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe @@ -100,7 +101,7 @@ class CanWestPaper(BasicNewsRecipe): dict(name='li', attrs={'class': 'print'}), dict(name='li', attrs={'class': 'share'}), dict(name='ul', attrs={'class': 'bullet'})] def get_cover_url(self): - from datetime import timedelta, date + from datetime import date, timedelta if self.fp_tag == '': return None cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg' + \ diff --git a/recipes/satmagazine.recipe b/recipes/satmagazine.recipe index 71b6b14c3a..92577a09b6 100644 --- a/recipes/satmagazine.recipe +++ b/recipes/satmagazine.recipe @@ -17,6 +17,7 @@ satmagazine.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/schongauer_nachrichten.recipe b/recipes/schongauer_nachrichten.recipe index daac613ad6..a1b4b8bac0 100644 --- a/recipes/schongauer_nachrichten.recipe +++ b/recipes/schongauer_nachrichten.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/science_advances.recipe b/recipes/science_advances.recipe index 9bece8b125..293a91defa 100644 --- a/recipes/science_advances.recipe +++ b/recipes/science_advances.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/science_news.recipe b/recipes/science_news.recipe index 3cf08e0cb2..f3de3c20b5 100644 --- a/recipes/science_news.recipe +++ b/recipes/science_news.recipe @@ -5,9 +5,10 @@ __license__ = 'GPL v3' sciencenews.org ''' -from calibre.web.feeds.news import BasicNewsRecipe, prefixed_classes import re +from calibre.web.feeds.news import BasicNewsRecipe, prefixed_classes + class ScienceNewsIssue(BasicNewsRecipe): title = u'Science News' diff --git a/recipes/science_x.recipe b/recipes/science_x.recipe index 044f95ca96..9faaaa707b 100644 --- a/recipes/science_x.recipe +++ b/recipes/science_x.recipe @@ -4,6 +4,7 @@ https://sciencex.com/ from calibre.web.feeds.news import BasicNewsRecipe + class scix(BasicNewsRecipe): title = 'Science X' description = ( diff --git a/recipes/scroll.recipe b/recipes/scroll.recipe index 4989a74806..511319a96b 100644 --- a/recipes/scroll.recipe +++ b/recipes/scroll.recipe @@ -1,5 +1,6 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe, classes + class scroll(BasicNewsRecipe): title = 'Scroll.in' diff --git a/recipes/seminar_magazine.recipe b/recipes/seminar_magazine.recipe index 7a07e63189..7fc77f46d0 100644 --- a/recipes/seminar_magazine.recipe +++ b/recipes/seminar_magazine.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe from datetime import datetime +from calibre.web.feeds.news import BasicNewsRecipe + class Seminar(BasicNewsRecipe): title = 'Seminar Magazine' diff --git a/recipes/shortlist.recipe b/recipes/shortlist.recipe index fa4407eab9..b8f7b9f772 100644 --- a/recipes/shortlist.recipe +++ b/recipes/shortlist.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/sign_of_the_times.recipe b/recipes/sign_of_the_times.recipe index d25dd080c0..c29678fd8f 100644 --- a/recipes/sign_of_the_times.recipe +++ b/recipes/sign_of_the_times.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.news import BasicNewsRecipe class SignOfTheTimes(BasicNewsRecipe): diff --git a/recipes/singtaohk.recipe b/recipes/singtaohk.recipe index a1f8a41fea..cd1d0df2f2 100644 --- a/recipes/singtaohk.recipe +++ b/recipes/singtaohk.recipe @@ -1,5 +1,6 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes + class STHKRecipe(BasicNewsRecipe): title = '星島日報 (香港)' __author__ = 'unkn0wn' diff --git a/recipes/skanderborglokalavisen_dk.recipe b/recipes/skanderborglokalavisen_dk.recipe index 81b35732f4..832edb1cd7 100644 --- a/recipes/skanderborglokalavisen_dk.recipe +++ b/recipes/skanderborglokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Skanderborg ''' diff --git a/recipes/skeptic.recipe b/recipes/skeptic.recipe index 5624087742..981f1f6b0a 100644 --- a/recipes/skeptic.recipe +++ b/recipes/skeptic.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class Skeptic(BasicNewsRecipe): title = u'The Skeptic' diff --git a/recipes/slate_star_codex.recipe b/recipes/slate_star_codex.recipe index ac484a2266..6f0bde61da 100644 --- a/recipes/slate_star_codex.recipe +++ b/recipes/slate_star_codex.recipe @@ -1,8 +1,9 @@ #!/usr/bin/env python -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + __license__ = 'GPL v3' __copyright__ = '2015, Ned Letcher ' diff --git a/recipes/slovo.recipe b/recipes/slovo.recipe index e717446f7b..b1c42b2459 100644 --- a/recipes/slovo.recipe +++ b/recipes/slovo.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class SlovoRecipe(BasicNewsRecipe): __license__ = 'GPL v3' diff --git a/recipes/smashing.recipe b/recipes/smashing.recipe index 840ca8b36f..409a623165 100644 --- a/recipes/smashing.recipe +++ b/recipes/smashing.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/sme.recipe b/recipes/sme.recipe index fef2c98fd2..bd636b0120 100644 --- a/recipes/sme.recipe +++ b/recipes/sme.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class SmeRecipe(BasicNewsRecipe): __license__ = 'GPL v3' diff --git a/recipes/smith.recipe b/recipes/smith.recipe index 705e4eb7ef..2088ecdc20 100644 --- a/recipes/smith.recipe +++ b/recipes/smith.recipe @@ -1,6 +1,5 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes - CATEGORIES = { 'smart-news': 'Smart News', 'history': 'History', diff --git a/recipes/sn_dk.recipe b/recipes/sn_dk.recipe index 21ff28c994..e8ac9a301e 100644 --- a/recipes/sn_dk.recipe +++ b/recipes/sn_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' sn.dk ''' diff --git a/recipes/soenderborglokalavisen_dk.recipe b/recipes/soenderborglokalavisen_dk.recipe index bb6b287b2d..42507b262b 100644 --- a/recipes/soenderborglokalavisen_dk.recipe +++ b/recipes/soenderborglokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Sønderborg ''' diff --git a/recipes/sol_haber.recipe b/recipes/sol_haber.recipe index 67bd040721..cf75602e33 100644 --- a/recipes/sol_haber.recipe +++ b/recipes/sol_haber.recipe @@ -10,7 +10,6 @@ www.sol.org.tr ''' import datetime - import re from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/sondagsavisen_dk.recipe b/recipes/sondagsavisen_dk.recipe index fa78dc1adf..4b26f3eebc 100644 --- a/recipes/sondagsavisen_dk.recipe +++ b/recipes/sondagsavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Søndagsavisen.dk ''' diff --git a/recipes/southernstar.recipe b/recipes/southernstar.recipe index ae9ffe9f05..dda6948750 100644 --- a/recipes/southernstar.recipe +++ b/recipes/southernstar.recipe @@ -5,13 +5,13 @@ __copyright__ = '2012, watou' ''' southernstar.ie ''' +import codecs +import os import re import tempfile -import os -import codecs +from calibre.ebooks.BeautifulSoup import NavigableString, Tag from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import Tag, NavigableString def new_tag(soup, name, attrs=()): diff --git a/recipes/spectator_magazine.recipe b/recipes/spectator_magazine.recipe index d8a9963bcb..f9003f7de2 100644 --- a/recipes/spectator_magazine.recipe +++ b/recipes/spectator_magazine.recipe @@ -1,5 +1,6 @@ from calibre.web.feeds.news import BasicNewsRecipe, classes + def absurl(url): if url.startswith('/'): url = 'https://www.spectator.co.uk' + url diff --git a/recipes/spektrum.recipe b/recipes/spektrum.recipe index 44abddd3e5..b9443e2355 100644 --- a/recipes/spektrum.recipe +++ b/recipes/spektrum.recipe @@ -7,6 +7,7 @@ ## from __future__ import absolute_import, division, print_function, unicode_literals + __license__ = 'GPL v3' __copyright__ = '' ''' diff --git a/recipes/spiegelde.recipe b/recipes/spiegelde.recipe index 02575fd335..26d6a3dcbf 100644 --- a/recipes/spiegelde.recipe +++ b/recipes/spiegelde.recipe @@ -3,6 +3,7 @@ # Copyright: '2019, vohe Based on the recipe by Darko Miletic ' from calibre.web.feeds.news import BasicNewsRecipe + ''' spiegel germany free newsfeed its free, read here: http://www.spiegel.de/dienste/besser-surfen-auf-spiegel-online-so-funktioniert-rss-a-1040321.html diff --git a/recipes/sportowefakty.recipe b/recipes/sportowefakty.recipe index 1fa447dad1..fe613235a6 100644 --- a/recipes/sportowefakty.recipe +++ b/recipes/sportowefakty.recipe @@ -3,6 +3,7 @@ __license__ = 'GPL v3' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/sportstar.recipe b/recipes/sportstar.recipe index 0225da39e2..bb7c49091e 100644 --- a/recipes/sportstar.recipe +++ b/recipes/sportstar.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes from collections import OrderedDict +from calibre.web.feeds.news import BasicNewsRecipe, classes + class Sportstar(BasicNewsRecipe): title = u'Sportstar' diff --git a/recipes/starnberger_merkur.recipe b/recipes/starnberger_merkur.recipe index 7da51ec009..57a9d338fc 100644 --- a/recipes/starnberger_merkur.recipe +++ b/recipes/starnberger_merkur.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/stars_and_stripes.recipe b/recipes/stars_and_stripes.recipe index a482f56eb9..a587b47d24 100644 --- a/recipes/stars_and_stripes.recipe +++ b/recipes/stars_and_stripes.recipe @@ -3,6 +3,7 @@ import re + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/strange_horizons.recipe b/recipes/strange_horizons.recipe index a39183644a..d5ff6dcb88 100644 --- a/recipes/strange_horizons.recipe +++ b/recipes/strange_horizons.recipe @@ -1,6 +1,8 @@ -from collections import defaultdict -from calibre.web.feeds.news import BasicNewsRecipe, classes import re +from collections import defaultdict + +from calibre.web.feeds.news import BasicNewsRecipe, classes + class StrangeHorizons(BasicNewsRecipe): title = 'Strange Horizons' diff --git a/recipes/strategic_culture.recipe b/recipes/strategic_culture.recipe index 9ba6c656b3..df07a09bef 100644 --- a/recipes/strategic_culture.recipe +++ b/recipes/strategic_culture.recipe @@ -7,6 +7,7 @@ www.strategic-culture.org ''' import time + from calibre import strftime from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/substack.recipe b/recipes/substack.recipe index b4cf42db93..4a19200c71 100644 --- a/recipes/substack.recipe +++ b/recipes/substack.recipe @@ -15,9 +15,9 @@ __date__ = '2020-12-19' __author__ = 'topynate' import json -from mechanize import Request from calibre.web.feeds.news import BasicNewsRecipe +from mechanize import Request class Substack(BasicNewsRecipe): diff --git a/recipes/sueddeutsche_mobil.recipe b/recipes/sueddeutsche_mobil.recipe index 9bc9de9e47..9516fdce31 100644 --- a/recipes/sueddeutsche_mobil.recipe +++ b/recipes/sueddeutsche_mobil.recipe @@ -12,11 +12,12 @@ szmobil.sueddeutsche.de/ # other small changes # 2012.08.04 Initial release -from calibre import strftime import datetime +import re + +from calibre import strftime from calibre.utils.date import utcnow from calibre.web.feeds.recipes import BasicNewsRecipe -import re class SZmobil(BasicNewsRecipe): diff --git a/recipes/sueddeutschezeitung.recipe b/recipes/sueddeutschezeitung.recipe index ceb5821ba7..88125650af 100644 --- a/recipes/sueddeutschezeitung.recipe +++ b/recipes/sueddeutschezeitung.recipe @@ -8,10 +8,11 @@ www.sueddeutsche.de/sz/ # 2014.12.15 Set Cover by lala-rob(web@lala-rob.de) # 2014.10.02 Fixed url Problem by lala-rob(web@lala-rob.de) -from calibre.web.feeds.news import BasicNewsRecipe -from calibre import strftime import datetime + +from calibre import strftime from calibre.utils.date import utcnow +from calibre.web.feeds.news import BasicNewsRecipe class SueddeutcheZeitung(BasicNewsRecipe): diff --git a/recipes/sunday_times_magazine.recipe b/recipes/sunday_times_magazine.recipe index f59dd15422..3106d89f53 100644 --- a/recipes/sunday_times_magazine.recipe +++ b/recipes/sunday_times_magazine.recipe @@ -4,10 +4,9 @@ __copyright__ = '2010-2019' www.thetimes.co.uk/magazine/the-sunday-times-magazine/ ''' -from mechanize import Request - from calibre import random_user_agent from calibre.web.feeds.news import BasicNewsRecipe +from mechanize import Request def classes(classes): @@ -75,8 +74,7 @@ class TimesOnline(BasicNewsRecipe): # }}} def get_cover_url(self): - from datetime import date - from datetime import timedelta + from datetime import date, timedelta today = date.today() today_index = today.weekday() if (today_index == 5): # new edition drops on Saturday AM diff --git a/recipes/swiatkindle.recipe b/recipes/swiatkindle.recipe index e51c47d12e..0616e4ff83 100644 --- a/recipes/swiatkindle.recipe +++ b/recipes/swiatkindle.recipe @@ -7,6 +7,7 @@ swiatczytnikow.pl ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/syddjurslokalavisen_dk.recipe b/recipes/syddjurslokalavisen_dk.recipe index 0a11637b0d..eba72320fa 100644 --- a/recipes/syddjurslokalavisen_dk.recipe +++ b/recipes/syddjurslokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Adresseavisen Syddjurs ''' diff --git a/recipes/tablety_pl.recipe b/recipes/tablety_pl.recipe index 30b7475239..43781dc3a1 100644 --- a/recipes/tablety_pl.recipe +++ b/recipes/tablety_pl.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class Tablety_pl(BasicNewsRecipe): title = u'Tablety.pl' diff --git a/recipes/tagespost.recipe b/recipes/tagespost.recipe index e4b807080f..2885db8bc2 100644 --- a/recipes/tagespost.recipe +++ b/recipes/tagespost.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + __license__ = 'GPL v3' __copyright__ = '2020, Pat Stapleton ' ''' diff --git a/recipes/tagesspiegel.recipe b/recipes/tagesspiegel.recipe index ee0e562c71..b0d088c4c2 100644 --- a/recipes/tagesspiegel.recipe +++ b/recipes/tagesspiegel.recipe @@ -3,6 +3,7 @@ # License: GPLv3 Copyright: 2016, Kovid Goyal from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/taggeschau_de.recipe b/recipes/taggeschau_de.recipe index a7764fd741..5dbacc2bfc 100644 --- a/recipes/taggeschau_de.recipe +++ b/recipes/taggeschau_de.recipe @@ -1,5 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re + +from calibre.web.feeds.news import BasicNewsRecipe + # History: # 1: Base Version # 2: Added rules for wdr.de, ndr.de, br-online.de diff --git a/recipes/tanuki.recipe b/recipes/tanuki.recipe index c2ca568760..b02527304b 100644 --- a/recipes/tanuki.recipe +++ b/recipes/tanuki.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class tanuki(BasicNewsRecipe): title = u'Tanuki' diff --git a/recipes/taz.recipe b/recipes/taz.recipe index 74a57af9cd..e571fade50 100644 --- a/recipes/taz.recipe +++ b/recipes/taz.recipe @@ -10,13 +10,15 @@ www.taz.de/digiabo ''' import os import zipfile -from calibre.web.feeds.news import BasicNewsRecipe + from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe + try: - from urllib.request import HTTPBasicAuthHandler, build_opener, install_opener, urlopen from urllib.error import HTTPError + from urllib.request import HTTPBasicAuthHandler, build_opener, install_opener, urlopen except ImportError: - from urllib2 import HTTPBasicAuthHandler, build_opener, install_opener, urlopen, HTTPError + from urllib2 import HTTPBasicAuthHandler, HTTPError, build_opener, install_opener, urlopen class TazDigiabo(BasicNewsRecipe): diff --git a/recipes/taz_rss.recipe b/recipes/taz_rss.recipe index 6a0be77a0d..8b256afc46 100644 --- a/recipes/taz_rss.recipe +++ b/recipes/taz_rss.recipe @@ -2,6 +2,7 @@ __license__ = 'GPL v3' __copyright__ = '2013, Alexander Schremmer , Robert Riemann ' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/technology_review_de.recipe b/recipes/technology_review_de.recipe index bae4015046..3caf9bc54f 100644 --- a/recipes/technology_review_de.recipe +++ b/recipes/technology_review_de.recipe @@ -1,6 +1,6 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals __license__ = 'GPL v3' __copyright__ = '2010, Anton Gillert ' @@ -10,6 +10,7 @@ Technology Review (deutsch) - heise.de/tr ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/tegernseer_zeitung.recipe b/recipes/tegernseer_zeitung.recipe index e2b168453c..b15840cb65 100644 --- a/recipes/tegernseer_zeitung.recipe +++ b/recipes/tegernseer_zeitung.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/tehelka.recipe b/recipes/tehelka.recipe index bdf7c9ac47..e90249d2c8 100644 --- a/recipes/tehelka.recipe +++ b/recipes/tehelka.recipe @@ -10,6 +10,7 @@ http://tehelka.com from calibre.web.feeds.news import BasicNewsRecipe + class Tehelka(BasicNewsRecipe): title = 'Tehelka' oldest_article = 7 diff --git a/recipes/telepolis.recipe b/recipes/telepolis.recipe index 2ce25c4d6c..a62cccbb79 100644 --- a/recipes/telepolis.recipe +++ b/recipes/telepolis.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/telepolis_artikel.recipe b/recipes/telepolis_artikel.recipe index 7359c60df1..bc1c8bbad0 100644 --- a/recipes/telepolis_artikel.recipe +++ b/recipes/telepolis_artikel.recipe @@ -5,6 +5,7 @@ __copyright__ = '2009, Gerhard Aigner ' ''' http://www.derstandard.at - Austrian Newspaper ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/the_age.recipe b/recipes/the_age.recipe index 539f50cfc2..662b7b61ff 100644 --- a/recipes/the_age.recipe +++ b/recipes/the_age.recipe @@ -6,11 +6,12 @@ __docformat__ = 'restructuredtext en' ''' theage.com.au ''' -from calibre import strftime -from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import BeautifulSoup import re +from calibre import strftime +from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.news import BasicNewsRecipe + class TheAge(BasicNewsRecipe): diff --git a/recipes/the_daily_news_egypt.recipe b/recipes/the_daily_news_egypt.recipe index 35277ed29f..e7cf75239c 100644 --- a/recipes/the_daily_news_egypt.recipe +++ b/recipes/the_daily_news_egypt.recipe @@ -4,6 +4,7 @@ __copyright__ = '2011, Pat Stapleton ' abc.net.au/news ''' import re + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/the_freeman.recipe b/recipes/the_freeman.recipe index 5359efe32b..95fb25ac23 100644 --- a/recipes/the_freeman.recipe +++ b/recipes/the_freeman.recipe @@ -4,6 +4,7 @@ www.philstar.com ''' import time + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/the_insider.recipe b/recipes/the_insider.recipe index 1bab06c122..adda8299ed 100644 --- a/recipes/the_insider.recipe +++ b/recipes/the_insider.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python2 # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/the_manila_bulletin.recipe b/recipes/the_manila_bulletin.recipe index 18b67cd115..68a2d11330 100644 --- a/recipes/the_manila_bulletin.recipe +++ b/recipes/the_manila_bulletin.recipe @@ -1,4 +1,5 @@ import time + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/the_manila_times.recipe b/recipes/the_manila_times.recipe index 25ea231aba..33fc278257 100644 --- a/recipes/the_manila_times.recipe +++ b/recipes/the_manila_times.recipe @@ -1,4 +1,5 @@ import time + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/the_marker.recipe b/recipes/the_marker.recipe index e50b4d9638..40444777e2 100644 --- a/recipes/the_marker.recipe +++ b/recipes/the_marker.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/the_philippine_daily_inquirer.recipe b/recipes/the_philippine_daily_inquirer.recipe index 3ffda42e3d..f12b85aadb 100644 --- a/recipes/the_philippine_daily_inquirer.recipe +++ b/recipes/the_philippine_daily_inquirer.recipe @@ -1,4 +1,5 @@ import time + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/the_philippine_star.recipe b/recipes/the_philippine_star.recipe index 201aa57525..9a674d1dd4 100644 --- a/recipes/the_philippine_star.recipe +++ b/recipes/the_philippine_star.recipe @@ -4,6 +4,7 @@ www.philstar.com ''' import time + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/the_press_project.recipe b/recipes/the_press_project.recipe index c86cc317f3..45560e7ed9 100644 --- a/recipes/the_press_project.recipe +++ b/recipes/the_press_project.recipe @@ -4,6 +4,7 @@ from calibre.web.feeds.news import BasicNewsRecipe + class ThePressProject(BasicNewsRecipe): title = 'ThePressProject' __author__ = 'Sotiris Papatheodorou' diff --git a/recipes/the_saturday_paper.recipe b/recipes/the_saturday_paper.recipe index 8fa9b80d3e..0f0358ff6b 100644 --- a/recipes/the_saturday_paper.recipe +++ b/recipes/the_saturday_paper.recipe @@ -3,6 +3,7 @@ # License: GPLv3 Copyright: 2021, Alistair Francis from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/the_week.recipe b/recipes/the_week.recipe index 10f2c91e80..3ad11bdaac 100644 --- a/recipes/the_week.recipe +++ b/recipes/the_week.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe from datetime import datetime +from calibre.web.feeds.news import BasicNewsRecipe + class TheWeek(BasicNewsRecipe): title = u'The Week' diff --git a/recipes/the_week_magazine_free.recipe b/recipes/the_week_magazine_free.recipe index 3869e68777..8b7a367cc7 100644 --- a/recipes/the_week_magazine_free.recipe +++ b/recipes/the_week_magazine_free.recipe @@ -1,9 +1,10 @@ ''' www.theweek.com ''' -from calibre.web.feeds.news import BasicNewsRecipe, classes from urllib.parse import quote +from calibre.web.feeds.news import BasicNewsRecipe, classes + class TheWeek(BasicNewsRecipe): title = 'The Week' diff --git a/recipes/the_week_uk.recipe b/recipes/the_week_uk.recipe index e614f8092e..07a9b6fe34 100644 --- a/recipes/the_week_uk.recipe +++ b/recipes/the_week_uk.recipe @@ -1,9 +1,10 @@ ''' www.theweek.com ''' -from calibre.web.feeds.news import BasicNewsRecipe, classes from urllib.parse import quote +from calibre.web.feeds.news import BasicNewsRecipe, classes + class TheWeek(BasicNewsRecipe): title = 'The Week' diff --git a/recipes/the_wire.recipe b/recipes/the_wire.recipe index f77235257f..2fcbf2aea0 100644 --- a/recipes/the_wire.recipe +++ b/recipes/the_wire.recipe @@ -1,5 +1,6 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe, classes + class TheWire(BasicNewsRecipe): title = 'The Wire' diff --git a/recipes/thecodelesscode.recipe b/recipes/thecodelesscode.recipe index 38586af523..c1b3cc6b0c 100644 --- a/recipes/thecodelesscode.recipe +++ b/recipes/thecodelesscode.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python from datetime import date + from lxml import etree __copyright__ = '2015, April King ' @@ -11,8 +12,8 @@ __version__ = '1.2' http://www.thecodelesscode.com/ ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup as bs +from calibre.web.feeds.news import BasicNewsRecipe class CodelessCode(BasicNewsRecipe): diff --git a/recipes/thecultofghoul.recipe b/recipes/thecultofghoul.recipe index a893994ce4..9401e90ecf 100644 --- a/recipes/thecultofghoul.recipe +++ b/recipes/thecultofghoul.recipe @@ -6,6 +6,7 @@ cultofghoul.blogspot.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/theeconomictimes_india_print_edition.recipe b/recipes/theeconomictimes_india_print_edition.recipe index 330fff007a..6895d870fd 100644 --- a/recipes/theeconomictimes_india_print_edition.recipe +++ b/recipes/theeconomictimes_india_print_edition.recipe @@ -4,6 +4,7 @@ economictimes.indiatimes.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe, classes diff --git a/recipes/theindiaforum.recipe b/recipes/theindiaforum.recipe index de84ef46ac..fa453011a6 100644 --- a/recipes/theindiaforum.recipe +++ b/recipes/theindiaforum.recipe @@ -1,6 +1,8 @@ -from calibre.web.feeds.news import BasicNewsRecipe, classes -from datetime import datetime, timezone, timedelta +from datetime import datetime, timedelta, timezone + from calibre.utils.date import parse_date +from calibre.web.feeds.news import BasicNewsRecipe, classes + class mains(BasicNewsRecipe): title = 'The India Forum' diff --git a/recipes/thenewcriterion.recipe b/recipes/thenewcriterion.recipe index fa08a1d2b3..fd200197ba 100644 --- a/recipes/thenewcriterion.recipe +++ b/recipes/thenewcriterion.recipe @@ -14,10 +14,11 @@ try: except ImportError: from urllib import urlencode import re -from mechanize import Request + from calibre import strftime -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe +from mechanize import Request class TheNewCriterion(BasicNewsRecipe): diff --git a/recipes/theoldie.recipe b/recipes/theoldie.recipe index 96d74064a3..fe0bb51fe5 100644 --- a/recipes/theoldie.recipe +++ b/recipes/theoldie.recipe @@ -3,9 +3,11 @@ Fetch The Oldie (Online Edition) ''' import re -from calibre.web.feeds.news import BasicNewsRecipe from datetime import datetime +from calibre.web.feeds.news import BasicNewsRecipe + + class PrivateEyeRecipe(BasicNewsRecipe): ## # Last Edited: 2023-08-07 diff --git a/recipes/theprint.recipe b/recipes/theprint.recipe index 7918e03d6a..11ae464fd5 100644 --- a/recipes/theprint.recipe +++ b/recipes/theprint.recipe @@ -5,6 +5,7 @@ from __future__ import absolute_import, division, print_function, unicode_literals from collections import defaultdict + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/thewest_au.recipe b/recipes/thewest_au.recipe index 68b6aae64d..a035a2d6b6 100644 --- a/recipes/thewest_au.recipe +++ b/recipes/thewest_au.recipe @@ -5,6 +5,7 @@ thewest.com.au ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/tijd.recipe b/recipes/tijd.recipe index 20fb4ee23f..4a0507343b 100644 --- a/recipes/tijd.recipe +++ b/recipes/tijd.recipe @@ -5,8 +5,8 @@ __copyright__ = '2009, Darko Miletic ' ''' www.tijd.be ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/time_magazine.recipe b/recipes/time_magazine.recipe index 7d97d1621c..679fd81190 100644 --- a/recipes/time_magazine.recipe +++ b/recipes/time_magazine.recipe @@ -3,10 +3,12 @@ # License: GPLv3 Copyright: 2016, Kovid Goyal from __future__ import absolute_import, division, print_function, unicode_literals + import json + from calibre.constants import iswindows -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe class TimeMagazine(BasicNewsRecipe): diff --git a/recipes/times_online.recipe b/recipes/times_online.recipe index ad3a0ce576..810fcfaf85 100644 --- a/recipes/times_online.recipe +++ b/recipes/times_online.recipe @@ -3,12 +3,11 @@ __copyright__ = '2010-2019, Bobby Steel , Darko Miletic' ''' www.thetimes.co.uk ''' -from mechanize import Request +import html5lib from calibre import random_user_agent from calibre.web.feeds.news import BasicNewsRecipe - -import html5lib from lxml import html +from mechanize import Request def classes(classes): diff --git a/recipes/todays_zaman.recipe b/recipes/todays_zaman.recipe index e4149284cc..3058fb5083 100644 --- a/recipes/todays_zaman.recipe +++ b/recipes/todays_zaman.recipe @@ -1,12 +1,14 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function + __license__ = 'GPL v3' __copyright__ = '2014, spswerling' ''' www.todayszaman.com ''' import re + from calibre.web.feeds.recipes import BasicNewsRecipe try: diff --git a/recipes/toiprint.recipe b/recipes/toiprint.recipe index c4399d1bad..3bc662766d 100644 --- a/recipes/toiprint.recipe +++ b/recipes/toiprint.recipe @@ -1,8 +1,8 @@ -from calibre.web.feeds.news import BasicNewsRecipe import json -from datetime import date from collections import defaultdict +from datetime import date +from calibre.web.feeds.news import BasicNewsRecipe # default edition is Delhi i.e., 'cap' # Hyderabad - 'toih'; Delhi - 'cap'; Mumbai - 'toim'; Banglore - 'toibgc'; diff --git a/recipes/tolzer_kurier.recipe b/recipes/tolzer_kurier.recipe index a0ad887a43..b197b6ddda 100644 --- a/recipes/tolzer_kurier.recipe +++ b/recipes/tolzer_kurier.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/toyokeizai.recipe b/recipes/toyokeizai.recipe index 70b239f323..e6a5c30ced 100644 --- a/recipes/toyokeizai.recipe +++ b/recipes/toyokeizai.recipe @@ -4,9 +4,10 @@ __copyright__ = '2010, Hiroshi Miura ' www.toyokeizai.net ''' -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class Toyokeizai(BasicNewsRecipe): title = u'ToyoKeizai News' diff --git a/recipes/trojmiasto_pl.recipe b/recipes/trojmiasto_pl.recipe index 8959e0e0b1..73d679aaf9 100644 --- a/recipes/trojmiasto_pl.recipe +++ b/recipes/trojmiasto_pl.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/trouw.recipe b/recipes/trouw.recipe index 48b0a3d4a9..089981197a 100644 --- a/recipes/trouw.recipe +++ b/recipes/trouw.recipe @@ -1,4 +1,5 @@ from calibre.web.feeds.news import BasicNewsRecipe + try: from http.cookiejar import Cookie except ImportError: diff --git a/recipes/trv.recipe b/recipes/trv.recipe index ba867fe560..9f001287a8 100644 --- a/recipes/trv.recipe +++ b/recipes/trv.recipe @@ -1,7 +1,8 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/tv2lorry_dk.recipe b/recipes/tv2lorry_dk.recipe index 0ab613cbe1..d49b3309d1 100644 --- a/recipes/tv2lorry_dk.recipe +++ b/recipes/tv2lorry_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' TV 2 Lorry ''' diff --git a/recipes/tv2nord_dk.recipe b/recipes/tv2nord_dk.recipe index 2f5393e8b2..0a6d3c405e 100644 --- a/recipes/tv2nord_dk.recipe +++ b/recipes/tv2nord_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' TV2 Nord ''' diff --git a/recipes/tv2oj_dk.recipe b/recipes/tv2oj_dk.recipe index 79832d4f9a..0e04b7fa3e 100644 --- a/recipes/tv2oj_dk.recipe +++ b/recipes/tv2oj_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' TV 2 | ØSTJYLLAND ''' diff --git a/recipes/tveast_dk.recipe b/recipes/tveast_dk.recipe index c63ddae843..255974b91e 100644 --- a/recipes/tveast_dk.recipe +++ b/recipes/tveast_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' TV ØST ''' diff --git a/recipes/tvmidtvest_dk.recipe b/recipes/tvmidtvest_dk.recipe index 31a8ebbbb1..a33477d8ac 100644 --- a/recipes/tvmidtvest_dk.recipe +++ b/recipes/tvmidtvest_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' TV MIDTVEST ''' diff --git a/recipes/tvsyd_dk.recipe b/recipes/tvsyd_dk.recipe index f62dc38f6f..9b31b197d4 100644 --- a/recipes/tvsyd_dk.recipe +++ b/recipes/tvsyd_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' TV SYD ''' diff --git a/recipes/tvxs.recipe b/recipes/tvxs.recipe index d9745d014a..eeb5d53db8 100644 --- a/recipes/tvxs.recipe +++ b/recipes/tvxs.recipe @@ -1,6 +1,7 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai import re + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/tweakers.recipe b/recipes/tweakers.recipe index 179e370019..64aa93c8e6 100644 --- a/recipes/tweakers.recipe +++ b/recipes/tweakers.recipe @@ -7,6 +7,7 @@ __copyright__ = '2009, Kovid Goyal ' __docformat__ = 'restructuredtext en' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/tweakers_net.recipe b/recipes/tweakers_net.recipe index 2fa3e41280..13a78898b7 100644 --- a/recipes/tweakers_net.recipe +++ b/recipes/tweakers_net.recipe @@ -12,6 +12,7 @@ removed some extra tags ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/tyden.cz.recipe b/recipes/tyden.cz.recipe index c16c58d38d..4a8e2d5761 100644 --- a/recipes/tyden.cz.recipe +++ b/recipes/tyden.cz.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import unicode_literals + from calibre.web.feeds.recipes import BasicNewsRecipe diff --git a/recipes/ua_fooball.recipe b/recipes/ua_fooball.recipe index c2efde73d8..34a1c26ac8 100644 --- a/recipes/ua_fooball.recipe +++ b/recipes/ua_fooball.recipe @@ -3,6 +3,7 @@ from calibre.web.feeds.news import BasicNewsRecipe + class UAFootball(BasicNewsRecipe): #Russian version diff --git a/recipes/ugeskriftet.recipe b/recipes/ugeskriftet.recipe index 0e7c475f31..20c0ddf269 100644 --- a/recipes/ugeskriftet.recipe +++ b/recipes/ugeskriftet.recipe @@ -3,6 +3,7 @@ from calibre.web.feeds.news import BasicNewsRecipe + class Ugeskriftet(BasicNewsRecipe): title = 'Ugeskriftet' description = 'Ugeskriftet for læger' diff --git a/recipes/ukraiyns_tizhdien.recipe b/recipes/ukraiyns_tizhdien.recipe index c529a94627..600d534654 100644 --- a/recipes/ukraiyns_tizhdien.recipe +++ b/recipes/ukraiyns_tizhdien.recipe @@ -1,7 +1,8 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/uncrate.recipe b/recipes/uncrate.recipe index f37cc6de0c..2ad0fb6f47 100644 --- a/recipes/uncrate.recipe +++ b/recipes/uncrate.recipe @@ -6,8 +6,8 @@ __copyright__ = '2009, Darko Miletic ' www.uncrate.com ''' -from calibre.web.feeds.recipes import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.recipes import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/unian_net_en.recipe b/recipes/unian_net_en.recipe index a15b32f5ef..55d9a43f64 100644 --- a/recipes/unian_net_en.recipe +++ b/recipes/unian_net_en.recipe @@ -3,6 +3,7 @@ from calibre.web.feeds.news import BasicNewsRecipe + class Unian(BasicNewsRecipe): title = 'UNIAN' description = ('UNIAN (Ukrainian Independent News Agency of News) is the largest independent news agency,' diff --git a/recipes/uninohimitu.recipe b/recipes/uninohimitu.recipe index 752c787fdc..a534b51f0d 100644 --- a/recipes/uninohimitu.recipe +++ b/recipes/uninohimitu.recipe @@ -5,6 +5,7 @@ http://ameblo.jp/sauta19/ ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/upi.recipe b/recipes/upi.recipe index cf376a79e3..923c7135f8 100644 --- a/recipes/upi.recipe +++ b/recipes/upi.recipe @@ -4,6 +4,7 @@ __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __docformat__ = 'restructuredtext en' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/usatoday.recipe b/recipes/usatoday.recipe index bc93aa545f..3a1bb1efe5 100644 --- a/recipes/usatoday.recipe +++ b/recipes/usatoday.recipe @@ -6,8 +6,8 @@ __copyright__ = '2008, Kovid Goyal ' usatoday.com ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe def classes(classes): diff --git a/recipes/utrinski.recipe b/recipes/utrinski.recipe index 571d8aad17..79efed89f9 100644 --- a/recipes/utrinski.recipe +++ b/recipes/utrinski.recipe @@ -7,11 +7,12 @@ __copyright__ = '2011, Darko Spasovski ' utrinski.com.mk ''' -import re import datetime -from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import BeautifulSoup +import re + from calibre import browser +from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.news import BasicNewsRecipe class UtrinskiVesnik(BasicNewsRecipe): diff --git a/recipes/valbybladet_dk.recipe b/recipes/valbybladet_dk.recipe index bfda08d0bc..7697e6bacc 100644 --- a/recipes/valbybladet_dk.recipe +++ b/recipes/valbybladet_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Valby Bladet ''' diff --git a/recipes/vancouver_province.recipe b/recipes/vancouver_province.recipe index 8d3f0b635b..838be31c73 100644 --- a/recipes/vancouver_province.recipe +++ b/recipes/vancouver_province.recipe @@ -1,14 +1,16 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function + __license__ = 'GPL v3' ''' www.canada.com ''' import re -from calibre.web.feeds.recipes import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.recipes import BasicNewsRecipe def new_tag(soup, name, attrs=()): @@ -142,7 +144,7 @@ class CanWestPaper(BasicNewsRecipe): dict(name='li', attrs={'class': 'print'}), dict(name='li', attrs={'class': 'share'}), dict(name='ul', attrs={'class': 'bullet'})] def get_cover_url(self): - from datetime import timedelta, date + from datetime import date, timedelta cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg' + \ str(date.today().day) + '/lg/' + self.fp_tag + '.jpg' br = BasicNewsRecipe.get_browser(self) diff --git a/recipes/vancouver_sun.recipe b/recipes/vancouver_sun.recipe index 1e665f66e0..07ec2c7bae 100644 --- a/recipes/vancouver_sun.recipe +++ b/recipes/vancouver_sun.recipe @@ -1,14 +1,16 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function + __license__ = 'GPL v3' ''' www.canada.com ''' import re -from calibre.web.feeds.recipes import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.recipes import BasicNewsRecipe def new_tag(soup, name, attrs=()): @@ -143,7 +145,7 @@ class CanWestPaper(BasicNewsRecipe): dict(name='li', attrs={'class': 'print'}), dict(name='li', attrs={'class': 'share'}), dict(name='ul', attrs={'class': 'bullet'})] def get_cover_url(self): - from datetime import timedelta, date + from datetime import date, timedelta cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg' + \ str(date.today().day) + '/lg/' + self.fp_tag + '.jpg' br = BasicNewsRecipe.get_browser(self) diff --git a/recipes/vanloesebladet_dk.recipe b/recipes/vanloesebladet_dk.recipe index 99e049a0c9..4f7fc165ae 100644 --- a/recipes/vanloesebladet_dk.recipe +++ b/recipes/vanloesebladet_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Vanløse Bladet ''' diff --git a/recipes/vardelokalavisen_dk.recipe b/recipes/vardelokalavisen_dk.recipe index ae7ab93ff3..fa32833ef4 100644 --- a/recipes/vardelokalavisen_dk.recipe +++ b/recipes/vardelokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Varde ''' diff --git a/recipes/vecernji_list.recipe b/recipes/vecernji_list.recipe index 4f3ea718d9..a18281edac 100644 --- a/recipes/vecernji_list.recipe +++ b/recipes/vecernji_list.recipe @@ -8,8 +8,9 @@ www.vecernji.hr ''' import re -from calibre.web.feeds.recipes import BasicNewsRecipe + from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.recipes import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/veintitres.recipe b/recipes/veintitres.recipe index 622e52f530..bbf25f267b 100644 --- a/recipes/veintitres.recipe +++ b/recipes/veintitres.recipe @@ -6,8 +6,8 @@ __copyright__ = '2009, Darko Miletic ' elargentino.com ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/vejlelokalavisen_dk.recipe b/recipes/vejlelokalavisen_dk.recipe index 9484c31705..615a159e5f 100644 --- a/recipes/vejlelokalavisen_dk.recipe +++ b/recipes/vejlelokalavisen_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Lokalavisen Vejle ''' diff --git a/recipes/vesterbrobladet_dk.recipe b/recipes/vesterbrobladet_dk.recipe index 765b7a907f..0dc23a1c39 100644 --- a/recipes/vesterbrobladet_dk.recipe +++ b/recipes/vesterbrobladet_dk.recipe @@ -1,8 +1,10 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 # https://manual.calibre-ebook.com/news_recipe.html -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe + ''' Vesterbro Bladet ''' diff --git a/recipes/vic_times.recipe b/recipes/vic_times.recipe index 53284bffe6..3e11e31e39 100644 --- a/recipes/vic_times.recipe +++ b/recipes/vic_times.recipe @@ -1,15 +1,16 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function + __license__ = 'GPL v3' ''' www.canada.com ''' import re -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): @@ -106,7 +107,7 @@ class TimesColonist(BasicNewsRecipe): BasicNewsRecipe.__init__(self, options, log, progress_reporter) def get_cover_url(self): - from datetime import timedelta, date + from datetime import date, timedelta cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg' + \ str(date.today().day) + '/lg/' + self.fp_tag + '.jpg' br = BasicNewsRecipe.get_browser(self) diff --git a/recipes/vice_magazine.recipe b/recipes/vice_magazine.recipe index a588e06184..b02816b24a 100644 --- a/recipes/vice_magazine.recipe +++ b/recipes/vice_magazine.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/vice_magazine_de.recipe b/recipes/vice_magazine_de.recipe index 4ae583dc35..5ffadb07d4 100644 --- a/recipes/vice_magazine_de.recipe +++ b/recipes/vice_magazine_de.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/vijesti.recipe b/recipes/vijesti.recipe index 0b3ad54531..e966e8f4cb 100644 --- a/recipes/vijesti.recipe +++ b/recipes/vijesti.recipe @@ -7,6 +7,7 @@ vijesti.me ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/villagevoice.recipe b/recipes/villagevoice.recipe index 36841a1ee1..7f300a94e9 100644 --- a/recipes/villagevoice.recipe +++ b/recipes/villagevoice.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/vio_mundo.recipe b/recipes/vio_mundo.recipe index d7286d60bc..3fcc75fe83 100644 --- a/recipes/vio_mundo.recipe +++ b/recipes/vio_mundo.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/volksrant.recipe b/recipes/volksrant.recipe index 1da78cc885..9a116aa7ce 100644 --- a/recipes/volksrant.recipe +++ b/recipes/volksrant.recipe @@ -1,7 +1,8 @@ #!/usr/bin/env python -from calibre.web.feeds.recipes import BasicNewsRecipe import uuid +from calibre.web.feeds.recipes import BasicNewsRecipe + class Volkskrant(BasicNewsRecipe): title = 'Volkskrant' diff --git a/recipes/vreme.recipe b/recipes/vreme.recipe index 7b66fb1422..f8b88e67eb 100644 --- a/recipes/vreme.recipe +++ b/recipes/vreme.recipe @@ -5,6 +5,7 @@ vreme.com ''' import re + from calibre import strftime from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/vrijnederland.recipe b/recipes/vrijnederland.recipe index bd5c7e80ce..9f2fc6f36a 100644 --- a/recipes/vrijnederland.recipe +++ b/recipes/vrijnederland.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import Tag +from calibre.web.feeds.news import BasicNewsRecipe def new_tag(soup, name, attrs=()): diff --git a/recipes/wapo_cartoons.recipe b/recipes/wapo_cartoons.recipe index d4097910ac..7ae597c864 100644 --- a/recipes/wapo_cartoons.recipe +++ b/recipes/wapo_cartoons.recipe @@ -1,7 +1,8 @@ -from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import BeautifulSoup from datetime import date, timedelta +from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.news import BasicNewsRecipe + class WaPoCartoonsRecipe(BasicNewsRecipe): __license__ = 'GPL v3' diff --git a/recipes/wash_post.recipe b/recipes/wash_post.recipe index 7d25743988..6460104be8 100644 --- a/recipes/wash_post.recipe +++ b/recipes/wash_post.recipe @@ -4,9 +4,10 @@ __copyright__ = '2011, Darko Miletic ' www.washingtonpost.com ''' +import json + from calibre.web.feeds.news import BasicNewsRecipe from html5_parser import parse -import json class TheWashingtonPost(BasicNewsRecipe): diff --git a/recipes/wash_post_print.recipe b/recipes/wash_post_print.recipe index c370f5250d..1e7d503aac 100644 --- a/recipes/wash_post_print.recipe +++ b/recipes/wash_post_print.recipe @@ -2,9 +2,11 @@ washingtonpost.com ''' +import json + from calibre.web.feeds.news import BasicNewsRecipe from html5_parser import parse -import json + class wapoprint(BasicNewsRecipe): title = 'The Washington Post | Print Edition' diff --git a/recipes/wash_times.recipe b/recipes/wash_times.recipe index 602338fc9c..a0a061dd5e 100644 --- a/recipes/wash_times.recipe +++ b/recipes/wash_times.recipe @@ -4,6 +4,7 @@ __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __docformat__ = 'restructuredtext en' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/watchingamerica.recipe b/recipes/watchingamerica.recipe index fb1966f6b0..ea3e104f00 100644 --- a/recipes/watchingamerica.recipe +++ b/recipes/watchingamerica.recipe @@ -1,5 +1,5 @@ -from calibre.web.feeds.news import BasicNewsRecipe from calibre.ebooks.BeautifulSoup import BeautifulSoup +from calibre.web.feeds.news import BasicNewsRecipe class WatchingAmericaRecipe(BasicNewsRecipe): diff --git a/recipes/weblogs_sl.recipe b/recipes/weblogs_sl.recipe index 3af06f252d..571ad1c55b 100644 --- a/recipes/weblogs_sl.recipe +++ b/recipes/weblogs_sl.recipe @@ -9,6 +9,7 @@ http://www.weblogssl.com/ ''' import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/weilheimer_tagblatt.recipe b/recipes/weilheimer_tagblatt.recipe index 96327e6a78..93a8c87f9a 100644 --- a/recipes/weilheimer_tagblatt.recipe +++ b/recipes/weilheimer_tagblatt.recipe @@ -1,5 +1,6 @@ # vim:fileencoding=utf-8 from __future__ import unicode_literals + ## # Written: November 2014 (new coding) # Version: 1.0 diff --git a/recipes/what_if.recipe b/recipes/what_if.recipe index a0c19e4d7c..5bbc7223d7 100644 --- a/recipes/what_if.recipe +++ b/recipes/what_if.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/windsor_star.recipe b/recipes/windsor_star.recipe index 833663af4a..763f8cfa4f 100644 --- a/recipes/windsor_star.recipe +++ b/recipes/windsor_star.recipe @@ -8,6 +8,7 @@ www.canada.com ''' import re + from calibre.web.feeds.news import BasicNewsRecipe @@ -100,7 +101,7 @@ class CanWestPaper(BasicNewsRecipe): dict(name='li', attrs={'class': 'print'}), dict(name='li', attrs={'class': 'share'}), dict(name='ul', attrs={'class': 'bullet'})] def get_cover_url(self): - from datetime import timedelta, date + from datetime import date, timedelta if self.fp_tag == '': return None cover = 'http://webmedia.newseum.org/newseum-multimedia/dfp/jpg' + \ diff --git a/recipes/wired_it.recipe b/recipes/wired_it.recipe index 084751bdb8..f1baf58574 100644 --- a/recipes/wired_it.recipe +++ b/recipes/wired_it.recipe @@ -1,4 +1,5 @@ import re + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/wnp.recipe b/recipes/wnp.recipe index 200b004717..c4ddbf0cca 100644 --- a/recipes/wnp.recipe +++ b/recipes/wnp.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class WNP(BasicNewsRecipe): title = u'WNP' diff --git a/recipes/wsj.recipe b/recipes/wsj.recipe index c3313516c0..8378c3a6eb 100644 --- a/recipes/wsj.recipe +++ b/recipes/wsj.recipe @@ -3,16 +3,17 @@ # License: GPLv3 Copyright: 2016, Kovid Goyal from __future__ import absolute_import, division, print_function, unicode_literals + import json import random import time from base64 import standard_b64encode from datetime import date, timedelta -from mechanize import Request from calibre.ptempfile import PersistentTemporaryFile from calibre.web.feeds.news import BasicNewsRecipe from css_selectors import Select +from mechanize import Request try: import urllib.parse as urlparse diff --git a/recipes/wsj_free.recipe b/recipes/wsj_free.recipe index d8bb8ce016..9b669fc6d7 100644 --- a/recipes/wsj_free.recipe +++ b/recipes/wsj_free.recipe @@ -3,16 +3,17 @@ # License: GPLv3 Copyright: 2016, Kovid Goyal from __future__ import absolute_import, division, print_function, unicode_literals + import json import random import time from base64 import standard_b64encode from datetime import date, timedelta -from mechanize import Request from calibre.ptempfile import PersistentTemporaryFile from calibre.web.feeds.news import BasicNewsRecipe from css_selectors import Select +from mechanize import Request try: import urllib.parse as urlparse diff --git a/recipes/xkcd.recipe b/recipes/xkcd.recipe index cd49a1641b..3f9728dbd5 100644 --- a/recipes/xkcd.recipe +++ b/recipes/xkcd.recipe @@ -13,8 +13,9 @@ Changed cover (drMerry) Fetch xkcd. ''' -import time import re +import time + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/yalansavar.recipe b/recipes/yalansavar.recipe index 24decee3ee..87998338bd 100644 --- a/recipes/yalansavar.recipe +++ b/recipes/yalansavar.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import AutomaticNewsRecipe diff --git a/recipes/yazihane.recipe b/recipes/yazihane.recipe index 78f092bd8c..b7fec64481 100644 --- a/recipes/yazihane.recipe +++ b/recipes/yazihane.recipe @@ -1,6 +1,7 @@ -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class AdvancedUserRecipe1350731826(BasicNewsRecipe): title = u'Yazihane' diff --git a/recipes/yomiuri.recipe b/recipes/yomiuri.recipe index 659845f7ef..f93b20cc63 100644 --- a/recipes/yomiuri.recipe +++ b/recipes/yomiuri.recipe @@ -4,9 +4,10 @@ __copyright__ = '2010,2014, Hiroshi Miura ' www.yomiuri.co.jp ''' -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class YOLNews(BasicNewsRecipe): title = u'Yomiuri Online (Latest)' diff --git a/recipes/yomiuri_world.recipe b/recipes/yomiuri_world.recipe index e93b99ccca..f7babc563a 100644 --- a/recipes/yomiuri_world.recipe +++ b/recipes/yomiuri_world.recipe @@ -4,9 +4,10 @@ __copyright__ = '2010,2014, Hiroshi Miura ' www.yomiuri.co.jp ''' -from calibre.web.feeds.news import BasicNewsRecipe import re +from calibre.web.feeds.news import BasicNewsRecipe + class YOLNews(BasicNewsRecipe): title = u'Yomiuri Online (World)' diff --git a/recipes/zadolba_li.recipe b/recipes/zadolba_li.recipe index aec4864e4d..719c4f480c 100644 --- a/recipes/zadolba_li.recipe +++ b/recipes/zadolba_li.recipe @@ -1,6 +1,7 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/zaobao.recipe b/recipes/zaobao.recipe index 24af1c0d89..5618a99fd8 100644 --- a/recipes/zaobao.recipe +++ b/recipes/zaobao.recipe @@ -5,8 +5,8 @@ __copyright__ = '2009, Pu Bo ' ''' zaobao.com ''' -from calibre.web.feeds.news import BasicNewsRecipe from calibre.web.feeds import feeds_from_index +from calibre.web.feeds.news import BasicNewsRecipe class ZAOBAO(BasicNewsRecipe): diff --git a/recipes/zaxid_net.recipe b/recipes/zaxid_net.recipe index 8ce3676e22..f514c45e12 100644 --- a/recipes/zaxid_net.recipe +++ b/recipes/zaxid_net.recipe @@ -1,7 +1,8 @@ #!/usr/bin/env python # vim:fileencoding=utf-8 -from __future__ import unicode_literals, division, absolute_import, print_function +from __future__ import absolute_import, division, print_function, unicode_literals + from calibre.web.feeds.news import BasicNewsRecipe diff --git a/recipes/zeitde.recipe b/recipes/zeitde.recipe index 2714db8d38..f6ae1edbd0 100644 --- a/recipes/zeitde.recipe +++ b/recipes/zeitde.recipe @@ -5,18 +5,20 @@ __copyright__ = '2008, Kovid Goyal ' Fetch Zeit-Online.de ''' import re -from calibre.web.feeds.news import BasicNewsRecipe from datetime import datetime + +from calibre.web.feeds.news import BasicNewsRecipe + try: from http.cookiejar import Cookie except ImportError: from cookielib import Cookie try: - from urllib.request import Request, urlopen from urllib.error import HTTPError + from urllib.request import Request, urlopen except ImportError: - from urllib2 import Request, urlopen, HTTPError + from urllib2 import HTTPError, Request, urlopen from calibre.ebooks.BeautifulSoup import BeautifulSoup diff --git a/recipes/zeitde_sub.recipe b/recipes/zeitde_sub.recipe index 3563d9f092..b9e36039a3 100644 --- a/recipes/zeitde_sub.recipe +++ b/recipes/zeitde_sub.recipe @@ -11,18 +11,21 @@ __version__ = '1.5' Die Zeit EPUB """ -import os -import zipfile -import re import io -from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ptempfile import PersistentTemporaryFile +import os +import re +import zipfile + from calibre import walk +from calibre.ptempfile import PersistentTemporaryFile +from calibre.web.feeds.news import BasicNewsRecipe + try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse from contextlib import closing + from calibre.utils.magick.draw import save_cover_data_to diff --git a/recipes/zycie_warszawy.recipe b/recipes/zycie_warszawy.recipe index a983eea9b6..60052d9827 100644 --- a/recipes/zycie_warszawy.recipe +++ b/recipes/zycie_warszawy.recipe @@ -10,6 +10,7 @@ zw.com.pl ''' import re + from calibre.web.feeds.news import BasicNewsRecipe