Update ScienceDaily

Fixes #1458142 [ScienceDaily feed not working](https://bugs.launchpad.net/calibre/+bug/1458142)

Merge branch 'master' of https://github.com/CoderAllan/calibre
This commit is contained in:
Kovid Goyal 2016-10-02 18:56:03 +05:30
commit 3078e13488

View File

@ -1,36 +1,38 @@
#!/usr/bin/env python2
#!/usr/bin/env python2
__license__ = 'GPL v3'
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
'''
sciencedaily.com
'''
from calibre.web.feeds.news import BasicNewsRecipe
from calibre.web.feeds.news import BasicNewsRecipe
class ScienceDaily(BasicNewsRecipe):
title = u'ScienceDaily'
__author__ = u'Darko Miletic'
description = u"Breaking science news and articles on global warming, extrasolar planets, stem cells, bird flu, autism, nanotechnology, dinosaurs, evolution -- the latest discoveries in astronomy, anthropology, biology, chemistry, climate &amp; environment, computers, engineering, health &amp; medicine, math, physics, psychology, technology, and more -- from the world's leading universities and research organizations." # noqa
oldest_article = 7
language = 'en'
title = 'ScienceDaily'
description = ('ScienceDaily is one of the Internet\'s most popular '
'science news web sites. Since starting in 1995, the '
'award-winning site has earned the loyalty of students, '
'researchers, healthcare professionals, government '
'agencies, educators and the general public around the '
'world. Now with more than 6 million monthly visitors '
'worldwide, ScienceDaily generates nearly 20 million '
'page views a month and is steadily growing in its '
'global audience.')
category = 'medicin, healthcare'
oldest_article = 7
max_articles_per_feed = 50
auto_cleanup = True
language = 'en'
max_articles_per_feed = 150
no_stylesheets = True
use_embedded_content = False
cover_url = 'http://www.sciencedaily.com/images/logo.gif'
keep_only_tags = [
dict(name='h1', attrs={'class': 'story'}), dict(
name='div', attrs={'id': 'story'})
# Feed are found here: https://www.sciencedaily.com/newsfeeds.htm
feeds = [
('Latest Science News', 'https://rss.sciencedaily.com/top.xml'),
('All Top News', 'https://rss.sciencedaily.com/top/science.xml'),
('Health News', 'https://rss.sciencedaily.com/top/health.xml'),
('Technology News', 'https://rss.sciencedaily.com/top/technology.xml'),
('Environment News', 'https://rss.sciencedaily.com/top/environment.xml'),
('Society News', 'https://rss.sciencedaily.com/top/society.xml'),
('Strange &amp; Offbeat News', 'https://rss.sciencedaily.com/strange_offbeat.xml'),
]
# @@@ float: righr; width: 500px (wtf)
remove_attributes = ['style', 'width']
remove_tags_after = dict(name='div', attrs={'id': 'citations'})
remove_tags = [
dict(name='div', attrs={'id': 'sharing'}), dict(name='div', attrs={'id': 'citations'}), dict(
name='div', attrs={'class': 'overlay'}), dict(name='a', attrs={'class': 'image'})
]
feeds = [(u"ScienceDaily", u'http://www.sciencedaily.com/newsfeed.xml')]