mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Recipes for Harpers, Science AAS, Science News, The Nation (thanks to Darko Miletic)
This commit is contained in:
parent
a084b0e198
commit
a7d54c1d77
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,8 @@ recipe_modules = [
|
||||
'jpost', 'jutarnji', 'nasa', 'reuters', 'spiegelde', 'wash_post', 'zeitde',
|
||||
'blic', 'novosti', 'danas', 'vreme', 'times_online', 'the_scotsman',
|
||||
'nytimes_sub', 'security_watch', 'cyberpresse', 'st_petersburg_times',
|
||||
'clarin', 'financial_times', 'heise', 'le_monde'
|
||||
'clarin', 'financial_times', 'heise', 'le_monde', 'harpers', 'science_aas',
|
||||
'science_news', 'the_nation'
|
||||
]
|
||||
|
||||
import re, imp, inspect, time, os
|
||||
|
28
src/calibre/web/feeds/recipes/harpers.py
Normal file
28
src/calibre/web/feeds/recipes/harpers.py
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
harpers.org
|
||||
'''
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class Harpers(BasicNewsRecipe):
|
||||
title = u"Harper's Magazine"
|
||||
__author__ = u'Darko Miletic'
|
||||
description = u"Harper's Magazine: Founded June 1850."
|
||||
oldest_article = 30
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
timefmt = ' [%A, %d %B, %Y]'
|
||||
|
||||
keep_only_tags = [ dict(name='div', attrs={'id':'cached'}) ]
|
||||
remove_tags = [
|
||||
dict(name='table', attrs={'class':'rcnt'})
|
||||
,dict(name='table', attrs={'class':'rcnt topline'})
|
||||
]
|
||||
|
||||
feeds = [
|
||||
(u"Harper's Magazine", u'http://www.harpers.org/rss/frontpage-rss20.xml')
|
||||
]
|
36
src/calibre/web/feeds/recipes/science_aas.py
Normal file
36
src/calibre/web/feeds/recipes/science_aas.py
Normal file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
sciencemag.org
|
||||
'''
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class ScienceAAS(BasicNewsRecipe):
|
||||
title = u'Science AAAS'
|
||||
__author__ = u'Darko Miletic'
|
||||
description = u'The best in science news, commentary, and research'
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
simultaneous_downloads = 1
|
||||
delay = 1
|
||||
timefmt = ' [%A, %d %B, %Y]'
|
||||
needs_subscription = True
|
||||
LOGIN = 'http://www.sciencemag.org/cgi/login?uri=%2Findex.dtl'
|
||||
|
||||
def get_browser(self):
|
||||
br = BasicNewsRecipe.get_browser()
|
||||
if self.username is not None and self.password is not None:
|
||||
br.open(self.LOGIN)
|
||||
br.select_form(name='registered_users_form')
|
||||
br['username'] = self.username
|
||||
br['code' ] = self.password
|
||||
br.submit()
|
||||
return br
|
||||
|
||||
keep_only_tags = [ dict(name='div', attrs={'id':'LegacyContent'}) ]
|
||||
|
||||
feeds = [(u"Science: Current Issue", u'http://www.sciencemag.org/rss/current.xml')]
|
27
src/calibre/web/feeds/recipes/science_news.py
Normal file
27
src/calibre/web/feeds/recipes/science_news.py
Normal file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
sciencenews.org
|
||||
'''
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class Sciencenews(BasicNewsRecipe):
|
||||
title = u'ScienceNews'
|
||||
__author__ = u'Darko Miletic'
|
||||
description = u"Science News is an award-winning weekly newsmagazine covering the most important research in all fields of science. Its 16 pages each week are packed with short, accurate articles that appeal to both general readers and scientists. Published since 1922, the magazine now reaches about 150,000 subscribers and more than 1 million readers. These are the latest News Items from Science News."
|
||||
oldest_article = 30
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
timefmt = ' [%A, %d %B, %Y]'
|
||||
|
||||
keep_only_tags = [ dict(name='div', attrs={'id':'column_action'}) ]
|
||||
remove_tags_after = dict(name='ul', attrs={'id':'content_functions_bottom'})
|
||||
remove_tags = [
|
||||
dict(name='ul', attrs={'id':'content_functions_bottom'})
|
||||
,dict(name='div', attrs={'id':'content_functions_top'})
|
||||
]
|
||||
|
||||
feeds = [(u"Science News / News Items", u'http://sciencenews.org/view/feed/type/news/name/news.rss')]
|
35
src/calibre/web/feeds/recipes/the_nation.py
Normal file
35
src/calibre/web/feeds/recipes/the_nation.py
Normal file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
thenation.com
|
||||
'''
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class Thenation(BasicNewsRecipe):
|
||||
title = u'The Nation'
|
||||
__author__ = u'Darko Miletic'
|
||||
description = u'Unconventional Wisdom Since 1865'
|
||||
oldest_article = 120
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
simultaneous_downloads = 1
|
||||
delay = 1
|
||||
timefmt = ' [%A, %d %B, %Y]'
|
||||
|
||||
|
||||
keep_only_tags = [ dict(name='div', attrs={'class':'main'}) ]
|
||||
remove_tags = [
|
||||
dict(name='div', attrs={'class':'mod tools'})
|
||||
,dict(name='div', attrs={'class':'inset' })
|
||||
,dict(name='div', attrs={'class':'share' })
|
||||
,dict(name='ol' , attrs={'id' :'comments' })
|
||||
,dict(name='p' , attrs={'class':'info' })
|
||||
,dict(name='a' , attrs={'class':'comments' })
|
||||
,dict(name='ul' , attrs={'class':'important'})
|
||||
,dict(name='object')
|
||||
]
|
||||
|
||||
feeds = [(u"Top Stories", u'http://feedproxy.google.com/TheNationEdPicks')]
|
Loading…
x
Reference in New Issue
Block a user