Recipe for Science Daily (thanks to Darko Miletic)

This commit is contained in:
Kovid Goyal 2008-12-21 09:25:48 -08:00
parent 18203fe159
commit aec0107b79
4 changed files with 36 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 B

View File

@ -18,7 +18,7 @@ recipe_modules = [
'nytimes_sub', 'security_watch', 'cyberpresse', 'st_petersburg_times', 'nytimes_sub', 'security_watch', 'cyberpresse', 'st_petersburg_times',
'clarin', 'financial_times', 'heise', 'le_monde', 'harpers', 'science_aas', 'clarin', 'financial_times', 'heise', 'le_monde', 'harpers', 'science_aas',
'science_news', 'the_nation', 'lrb', 'harpers_full', 'liberation', 'science_news', 'the_nation', 'lrb', 'harpers_full', 'liberation',
'linux_magazine', 'telegraph_uk', 'utne', 'linux_magazine', 'telegraph_uk', 'utne', 'sciencedaily'
] ]
import re, imp, inspect, time, os import re, imp, inspect, time, os

View File

@ -0,0 +1,32 @@
#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
'''
sciencedaily.com
'''
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."
oldest_article = 7
max_articles_per_feed = 100
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'})
]
remove_tags_after = dict(name='div', attrs={'id':'citationbox'})
remove_tags = [
dict(name='div', attrs={'id':'seealso'})
,dict(name='div', attrs={'id':'citationbox'})
]
feeds = [(u"ScienceDaily", u'http://www.sciencedaily.com/newsfeed.xml')]