mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
pep8
This commit is contained in:
parent
b7705027d9
commit
1ca6887e6c
@ -3,14 +3,15 @@
|
|||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
|
||||||
class CACM(BasicNewsRecipe):
|
class CACM(BasicNewsRecipe):
|
||||||
title = "ACM CACM Magazine"
|
title = "ACM CACM Magazine"
|
||||||
description = "Published on day 1 of every month."
|
description = "Published on day 1 of every month."
|
||||||
oldest_article = 30
|
oldest_article = 30
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
auto_cleanup = True
|
auto_cleanup = True
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
('ACM CACM', 'https://cacm.acm.org/magazine.rss'),
|
('ACM CACM', 'https://cacm.acm.org/magazine.rss'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -4,50 +4,90 @@ Fetch RSS-Feeds http://spectrum.ieee.org
|
|||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
|
||||||
class IEEESpectrumOnline(BasicNewsRecipe):
|
class IEEESpectrumOnline(BasicNewsRecipe):
|
||||||
|
|
||||||
title = u'IEEE Spectrum Online'
|
title = u'IEEE Spectrum Online'
|
||||||
description = 'All the articles and blog posts from IEEE Spectrum online. This is not the magazine.'
|
description = 'All the articles and blog posts from IEEE Spectrum online. This is not the magazine.'
|
||||||
publisher = u'IEEE.org'
|
publisher = u'IEEE.org'
|
||||||
__author__ = 'Armin Geller'
|
__author__ = 'Armin Geller'
|
||||||
category = 'news, electronics, IT, computer science'
|
category = 'news, electronics, IT, computer science'
|
||||||
# Version: 1.0 AGe 2014-07-31
|
# Version: 1.0 AGe 2014-07-31
|
||||||
# Version: 1.1 AGe 2019-02-18
|
# Version: 1.1 AGe 2019-02-18
|
||||||
# Version: 1.2 AGe 2021-05-03
|
# Version: 1.2 AGe 2021-05-03
|
||||||
language = 'en'
|
language = 'en'
|
||||||
encoding = 'utf-8'
|
encoding = 'utf-8'
|
||||||
oldest_article = 7
|
oldest_article = 7
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
remove_empty_feeds = True
|
remove_empty_feeds = True
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
('IEEE Spectrum Recent Content', 'https://spectrum.ieee.org/rss/fulltext'),
|
('IEEE Spectrum Recent Content', 'https://spectrum.ieee.org/rss/fulltext'),
|
||||||
('Spectrum videos','https://spectrum.ieee.org/rss/videos'),
|
('Spectrum videos', 'https://spectrum.ieee.org/rss/videos'),
|
||||||
('Blog: Automaton','https://spectrum.ieee.org/rss/blog/automaton/fulltext'),
|
('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: Energywise',
|
||||||
('Blog: Tech Talk','https://spectrum.ieee.org/rss/blog/tech-talk/fulltext'),
|
'https://spectrum.ieee.org/rss/blog/energywise/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: Nanoclast', 'https://spectrum.ieee.org/rss/blog/nanoclast/fulltext'),
|
||||||
('Blog: Human OS','https://spectrum.ieee.org/rss/blog/the-human-os/fulltext'),
|
('Blog: Tech Talk', 'https://spectrum.ieee.org/rss/blog/tech-talk/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'),
|
'Blog: The Institute',
|
||||||
('Topic: Aerospace','https://spectrum.ieee.org/rss/blog/automaton/fulltext'),
|
'https://spectrum.ieee.org/rss/the-institute/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'),
|
'Blog: Cars That Think',
|
||||||
('Topic: History','https://spectrum.ieee.org/rss/tech-history/fulltext'),
|
'https://spectrum.ieee.org/rss/blog/cars-that-think/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'),
|
'Blog: Human OS',
|
||||||
('Topic: IEEE COVID-19 News & Resources','https://spectrum.ieee.org/rss/the-institute/ieee-covid19-resources'),
|
'https://spectrum.ieee.org/rss/blog/the-human-os/fulltext'
|
||||||
('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'),
|
'Blog: Risk Factor',
|
||||||
('Topic: Green Tech','https://spectrum.ieee.org/rss/green-tech/fulltext'),
|
'https://spectrum.ieee.org/rss/blog/riskfactor/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'),
|
'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
|
# Add 'https://spectrum.ieee.org' in front of image url for download images
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
from __future__ import unicode_literals, division, absolute_import, print_function
|
from __future__ import unicode_literals, division, absolute_import, print_function
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
|
||||||
class Quanta(BasicNewsRecipe):
|
class Quanta(BasicNewsRecipe):
|
||||||
title = "Quanta Magazine"
|
title = "Quanta Magazine"
|
||||||
|
__author__ = 'lui1'
|
||||||
description = "Articles from the magazine. Please set to download weekly."
|
description = "Articles from the magazine. Please set to download weekly."
|
||||||
|
|
||||||
oldest_article = 7
|
oldest_article = 7
|
||||||
@ -15,7 +17,7 @@ class Quanta(BasicNewsRecipe):
|
|||||||
publication_type = "blog"
|
publication_type = "blog"
|
||||||
cover_url = "https://d2r55xnwy6nx47.cloudfront.net/uploads/2017/05/logo.png"
|
cover_url = "https://d2r55xnwy6nx47.cloudfront.net/uploads/2017/05/logo.png"
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
('Articles', 'https://api.quantamagazine.org/feed/'),
|
('Articles', 'https://api.quantamagazine.org/feed/'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ sciencenews.org
|
|||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
|
||||||
class ScienceNewsIssue(BasicNewsRecipe):
|
class ScienceNewsIssue(BasicNewsRecipe):
|
||||||
title = u'Science News'
|
title = u'Science News'
|
||||||
__author__ = u'Darko Miletic, Sujata Raman and Starson17'
|
__author__ = u'Darko Miletic, Sujata Raman and Starson17'
|
||||||
@ -25,15 +26,21 @@ class ScienceNewsIssue(BasicNewsRecipe):
|
|||||||
auto_cleanup = False
|
auto_cleanup = False
|
||||||
|
|
||||||
keep_only_tags = [
|
keep_only_tags = [
|
||||||
dict(attrs={'class': lambda x: x and (
|
dict(
|
||||||
'single__content___' in x or 'header-default__title___' in x or
|
attrs={
|
||||||
'header-default__deck___' in x or 'header-default__figure___' in x
|
'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 = [
|
remove_tags = [
|
||||||
dict(attrs={'class': lambda x: x and (
|
dict(
|
||||||
'newsletter-signup__wrapper___' in x
|
attrs={'class': lambda x: x and ('newsletter-signup__wrapper___' in x)}
|
||||||
)})
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
feeds = [(u"Articles", u'https://www.sciencenews.org/feed')]
|
feeds = [(u"Articles", u'https://www.sciencenews.org/feed')]
|
||||||
@ -45,5 +52,7 @@ class ScienceNewsIssue(BasicNewsRecipe):
|
|||||||
while d <= t:
|
while d <= t:
|
||||||
ld = d
|
ld = d
|
||||||
d += datetime.timedelta(days=14)
|
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
|
return url
|
||||||
|
Loading…
x
Reference in New Issue
Block a user