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,6 +3,7 @@
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
|
||||
class CACM(BasicNewsRecipe):
|
||||
title = "ACM CACM Magazine"
|
||||
description = "Published on day 1 of every month."
|
||||
|
@ -4,6 +4,7 @@ Fetch RSS-Feeds http://spectrum.ieee.org
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
|
||||
class IEEESpectrumOnline(BasicNewsRecipe):
|
||||
|
||||
title = u'IEEE Spectrum Online'
|
||||
@ -24,30 +25,69 @@ class IEEESpectrumOnline(BasicNewsRecipe):
|
||||
('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: 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'),
|
||||
(
|
||||
'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: 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: 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: 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'),
|
||||
(
|
||||
'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
|
||||
|
@ -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"
|
||||
__author__ = 'lui1'
|
||||
description = "Articles from the magazine. Please set to download weekly."
|
||||
|
||||
oldest_article = 7
|
||||
|
@ -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 (
|
||||
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
|
||||
)})
|
||||
'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
|
||||
|
Loading…
x
Reference in New Issue
Block a user