diff --git a/recipes/cacm.recipe b/recipes/cacm.recipe index 4183458af7..a4f209b911 100644 --- a/recipes/cacm.recipe +++ b/recipes/cacm.recipe @@ -3,17 +3,18 @@ from calibre.web.feeds.news import BasicNewsRecipe + class CACM(BasicNewsRecipe): - title = "ACM CACM Magazine" - description = "Published on day 1 of every month." + title = "ACM CACM Magazine" + description = "Published on day 1 of every month." oldest_article = 30 max_articles_per_feed = 100 - auto_cleanup = True + auto_cleanup = True - feeds = [ + feeds = [ ('ACM CACM', 'https://cacm.acm.org/magazine.rss'), ] - + def get_cover_url(self): """ Parse out cover URL from cover page. diff --git a/recipes/ieeespectrum.recipe b/recipes/ieeespectrum.recipe index 00a5733bf6..46413139e9 100644 --- a/recipes/ieeespectrum.recipe +++ b/recipes/ieeespectrum.recipe @@ -4,50 +4,90 @@ Fetch RSS-Feeds http://spectrum.ieee.org from calibre.web.feeds.news import BasicNewsRecipe + class IEEESpectrumOnline(BasicNewsRecipe): - title = u'IEEE Spectrum Online' - description = 'All the articles and blog posts from IEEE Spectrum online. This is not the magazine.' - publisher = u'IEEE.org' - __author__ = 'Armin Geller' - category = 'news, electronics, IT, computer science' + title = u'IEEE Spectrum Online' + description = 'All the articles and blog posts from IEEE Spectrum online. This is not the magazine.' + publisher = u'IEEE.org' + __author__ = 'Armin Geller' + category = 'news, electronics, IT, computer science' # Version: 1.0 AGe 2014-07-31 # Version: 1.1 AGe 2019-02-18 # Version: 1.2 AGe 2021-05-03 - language = 'en' - encoding = 'utf-8' + language = 'en' + encoding = 'utf-8' oldest_article = 7 max_articles_per_feed = 100 remove_empty_feeds = True feeds = [ - ('IEEE Spectrum Recent Content', 'https://spectrum.ieee.org/rss/fulltext'), - ('Spectrum videos','https://spectrum.ieee.org/rss/videos'), - ('Blog: Automaton','https://spectrum.ieee.org/rss/blog/automaton/fulltext'), - ('Blog: Energywise','https://spectrum.ieee.org/rss/blog/energywise/fulltext'), - ('Blog: Nanoclast','https://spectrum.ieee.org/rss/blog/nanoclast/fulltext'), - ('Blog: Tech Talk','https://spectrum.ieee.org/rss/blog/tech-talk/fulltext'), - ('Blog: The Institute','https://spectrum.ieee.org/rss/the-institute/fulltext'), - ('Blog: Cars That Think','https://spectrum.ieee.org/rss/blog/cars-that-think/fulltext'), - ('Blog: Human OS','https://spectrum.ieee.org/rss/blog/the-human-os/fulltext'), - ('Blog: Risk Factor','https://spectrum.ieee.org/rss/blog/riskfactor/fulltext'), - ('Blog: View From the Valley','https://spectrum.ieee.org/rss/blog/view-from-the-valley/fulltext'), - ('Topic: Aerospace','https://spectrum.ieee.org/rss/blog/automaton/fulltext'), - ('Topic: Biomedical','https://spectrum.ieee.org/rss/biomedical/fulltext'), - ('Topic: Energy','https://spectrum.ieee.org/rss/energy/fulltext'), - ('Topic: Geek Life','https://spectrum.ieee.org/rss/at-work/fulltext'), - ('Topic: History','https://spectrum.ieee.org/rss/tech-history/fulltext'), - ('Topic: News From Around IEEE','https://spectrum.ieee.org/rss/blog/news-from-around-ieee/fulltext'), - ('Topic: Robotics','https://spectrum.ieee.org/rss/robotics/fulltext'), - ('Topic: Telecom','https://spectrum.ieee.org/rss/telecom/fulltext'), - ('Topic: IEEE COVID-19 News & Resources','https://spectrum.ieee.org/rss/the-institute/ieee-covid19-resources'), - ('Topic: At Work','https://spectrum.ieee.org/rss/at-work/fulltext'), - ('Topic: Computing','https://spectrum.ieee.org/rss/computing/fulltext'), - ('Topic: Gadgets','https://spectrum.ieee.org/rss/consumer-electronics/fulltext'), - ('Topic: Green Tech','https://spectrum.ieee.org/rss/green-tech/fulltext'), - ('Topic: Semiconductors','https://spectrum.ieee.org/rss/semiconductors/fulltext'), - ('Topic: Transportation','https://spectrum.ieee.org/rss/transportation/fulltext'), - ('Topic: Radio Spectrum Podcasts- NEW','https://feeds.transistor.fm/radiospectrum'), + ('IEEE Spectrum Recent Content', 'https://spectrum.ieee.org/rss/fulltext'), + ('Spectrum videos', 'https://spectrum.ieee.org/rss/videos'), + ('Blog: Automaton', 'https://spectrum.ieee.org/rss/blog/automaton/fulltext'), + ( + 'Blog: Energywise', + 'https://spectrum.ieee.org/rss/blog/energywise/fulltext' + ), + ('Blog: Nanoclast', 'https://spectrum.ieee.org/rss/blog/nanoclast/fulltext'), + ('Blog: Tech Talk', 'https://spectrum.ieee.org/rss/blog/tech-talk/fulltext'), + ( + 'Blog: The Institute', + 'https://spectrum.ieee.org/rss/the-institute/fulltext' + ), + ( + 'Blog: Cars That Think', + 'https://spectrum.ieee.org/rss/blog/cars-that-think/fulltext' + ), + ( + 'Blog: Human OS', + 'https://spectrum.ieee.org/rss/blog/the-human-os/fulltext' + ), + ( + 'Blog: Risk Factor', + 'https://spectrum.ieee.org/rss/blog/riskfactor/fulltext' + ), + ( + 'Blog: View From the Valley', + 'https://spectrum.ieee.org/rss/blog/view-from-the-valley/fulltext' + ), + ( + 'Topic: Aerospace', + 'https://spectrum.ieee.org/rss/blog/automaton/fulltext' + ), + ('Topic: Biomedical', 'https://spectrum.ieee.org/rss/biomedical/fulltext'), + ('Topic: Energy', 'https://spectrum.ieee.org/rss/energy/fulltext'), + ('Topic: Geek Life', 'https://spectrum.ieee.org/rss/at-work/fulltext'), + ('Topic: History', 'https://spectrum.ieee.org/rss/tech-history/fulltext'), + ( + 'Topic: News From Around IEEE', + 'https://spectrum.ieee.org/rss/blog/news-from-around-ieee/fulltext' + ), + ('Topic: Robotics', 'https://spectrum.ieee.org/rss/robotics/fulltext'), + ('Topic: Telecom', 'https://spectrum.ieee.org/rss/telecom/fulltext'), + ( + 'Topic: IEEE COVID-19 News & Resources', + 'https://spectrum.ieee.org/rss/the-institute/ieee-covid19-resources' + ), + ('Topic: At Work', 'https://spectrum.ieee.org/rss/at-work/fulltext'), + ('Topic: Computing', 'https://spectrum.ieee.org/rss/computing/fulltext'), + ( + 'Topic: Gadgets', + 'https://spectrum.ieee.org/rss/consumer-electronics/fulltext' + ), + ('Topic: Green Tech', 'https://spectrum.ieee.org/rss/green-tech/fulltext'), + ( + 'Topic: Semiconductors', + 'https://spectrum.ieee.org/rss/semiconductors/fulltext' + ), + ( + 'Topic: Transportation', + 'https://spectrum.ieee.org/rss/transportation/fulltext' + ), + ( + 'Topic: Radio Spectrum Podcasts- NEW', + 'https://feeds.transistor.fm/radiospectrum' + ), ] # Add 'https://spectrum.ieee.org' in front of image url for download images diff --git a/recipes/quanta_magazine.recipe b/recipes/quanta_magazine.recipe index c11ec81b18..eaf08f5f22 100644 --- a/recipes/quanta_magazine.recipe +++ b/recipes/quanta_magazine.recipe @@ -4,8 +4,10 @@ from __future__ import unicode_literals, division, absolute_import, print_function from calibre.web.feeds.news import BasicNewsRecipe + class Quanta(BasicNewsRecipe): - title = "Quanta Magazine" + title = "Quanta Magazine" + __author__ = 'lui1' description = "Articles from the magazine. Please set to download weekly." oldest_article = 7 @@ -15,7 +17,7 @@ class Quanta(BasicNewsRecipe): publication_type = "blog" cover_url = "https://d2r55xnwy6nx47.cloudfront.net/uploads/2017/05/logo.png" - feeds = [ + feeds = [ ('Articles', 'https://api.quantamagazine.org/feed/'), ] diff --git a/recipes/science_news.recipe b/recipes/science_news.recipe index c91c8a0928..e09582def2 100644 --- a/recipes/science_news.recipe +++ b/recipes/science_news.recipe @@ -8,6 +8,7 @@ sciencenews.org from calibre.web.feeds.news import BasicNewsRecipe import datetime + class ScienceNewsIssue(BasicNewsRecipe): title = u'Science News' __author__ = u'Darko Miletic, Sujata Raman and Starson17' @@ -25,15 +26,21 @@ class ScienceNewsIssue(BasicNewsRecipe): auto_cleanup = False keep_only_tags = [ - dict(attrs={'class': lambda x: x and ( - 'single__content___' in x or 'header-default__title___' in x or - 'header-default__deck___' in x or 'header-default__figure___' in x - )}) + dict( + attrs={ + 'class': + lambda x: x and ( + 'single__content___' in x or 'header-default__title___' in x or + 'header-default__deck___' in x or 'header-default__figure___' in + x + ) + } + ) ] remove_tags = [ - dict(attrs={'class': lambda x: x and ( - 'newsletter-signup__wrapper___' in x - )}) + dict( + attrs={'class': lambda x: x and ('newsletter-signup__wrapper___' in x)} + ) ] feeds = [(u"Articles", u'https://www.sciencenews.org/feed')] @@ -45,5 +52,7 @@ class ScienceNewsIssue(BasicNewsRecipe): while d <= t: ld = d d += datetime.timedelta(days=14) - url = ld.strftime("https://www.sciencenews.org/wp-content/uploads/%Y/%m/%m%d%y_cover.jpg") + url = ld.strftime( + "https://www.sciencenews.org/wp-content/uploads/%Y/%m/%m%d%y_cover.jpg" + ) return url