This commit is contained in:
Kovid Goyal 2008-03-27 03:22:50 +00:00
parent 9f581104e0
commit 095f0eaec9
10 changed files with 26 additions and 9 deletions

View File

@ -10,7 +10,9 @@ from libprs500.web.feeds.news import BasicNewsRecipe
class TheAtlantic(BasicNewsRecipe):
title = 'The Atlantic'
title = 'The Atlantic'
__author__ = 'Kovid Goyal'
description = 'Current affairs and politics focussed on the US'
INDEX = 'http://www.theatlantic.com/doc/current'
remove_tags_before = dict(name='div', id='storytop')
@ -49,4 +51,4 @@ class TheAtlantic(BasicNewsRecipe):
})
return [('Current Issue', articles)]
return [('Current Issue', articles)]

View File

@ -10,6 +10,8 @@ from libprs500.web.feeds.news import BasicNewsRecipe
class BBC(BasicNewsRecipe):
title = u'The BBC'
__author__ = 'Kovid Goyal'
description = 'Global news and current affairs from the British Broadcasting Corporation'
no_stylesheets = True
remove_tags = [dict(name='div', attrs={'class':'footer'})]
@ -32,4 +34,4 @@ class BBC(BasicNewsRecipe):
]
def print_version(self, url):
return url.replace('http://', 'http://newsvote.bbc.co.uk/mpapps/pagetools/print/')
return url.replace('http://', 'http://newsvote.bbc.co.uk/mpapps/pagetools/print/')

View File

@ -12,6 +12,8 @@ from libprs500.ptempfile import PersistentTemporaryDirectory
class Dilbert(CustomIndexRecipe):
title = 'Dilbert'
__author__ = 'Kovid Goyal'
description = 'Daily dilbert comic (from the last five days)'
timefmt = ' [%d %b %Y]'
feeds = [('Dilbert', 'http://feeds.feedburner.com/tapestrydilbert')]

View File

@ -14,6 +14,8 @@ from urllib2 import quote
class Economist(BasicNewsRecipe):
title = 'The Economist'
__author__ = "Kovid Goyal"
description = 'Global news and current affairs from a European perspective'
oldest_article = 7.0
needs_subscription = False # Strange but true
INDEX = 'http://www.economist.com/printedition'
@ -61,4 +63,4 @@ class Economist(BasicNewsRecipe):
feeds[key].append(article)
ans = [(key, feeds[key]) for key in ans if feeds.has_key(key)]
return ans
return ans

View File

@ -10,6 +10,7 @@ class Newsweek(BasicNewsRecipe):
title = 'Newsweek'
__author__ = 'Kovid Goyal'
description = 'Weekly news and current affairs in the US'
no_stylesheets = True
extra_css = '#content { font:serif 12pt; }\n.story {font:12pt}\n.HorizontalHeader {font:18pt}\n.deck {font:16pt}'
@ -88,4 +89,4 @@ class Newsweek(BasicNewsRecipe):
img = soup.find('img', alt='Current Magazine')
if img and img.parent.has_key('href'):
return urlopen(img.parent['href']).read()

View File

@ -10,7 +10,9 @@ from libprs500.web.feeds.recipes import BasicNewsRecipe
class NYTimes(BasicNewsRecipe):
title = 'The New York Times'
title = 'The New York Times'
__author__ = 'Kovid Goyal'
description = 'Daily news from the New York Times'
timefmt = ' [%a, %d %b, %Y]'
needs_subscription = True

View File

@ -12,6 +12,8 @@ import re
class OutlookIndia(BasicNewsRecipe):
title = 'Outlook India'
__author__ = 'Kovid Goyal'
description = 'Weekly news magazine focussed on India.'
recursions = 1
match_regexp = r'full.asp.*&pn=\d+'
html2lrf_options = ['--ignore-tables']
@ -79,4 +81,4 @@ class OutlookIndia(BasicNewsRecipe):
for b in bad:
b.extract()
return soup

View File

@ -11,6 +11,8 @@ from libprs500.web.feeds.news import BasicNewsRecipe
class Portfolio(BasicNewsRecipe):
title = 'Portfolio'
__author__ = 'JTravers'
description = 'Conde Nast Portfolio: For the businessman.'
use_embedded_content = True
timefmt = ' [%a, %b %d, %Y]'
html2lrf_options = ['--ignore-tables']
@ -30,4 +32,4 @@ class Portfolio(BasicNewsRecipe):
('Playbook', 'http://feeds.portfolio.com/portfolio/playbook'),
('Tech Observer', 'http://feeds.portfolio.com/portfolio/thetechobserver'),
('World According to ...', 'http://feeds.portfolio.com/portfolio/theworldaccordingto'),
]
]

View File

@ -43,4 +43,4 @@ class USAToday(BasicNewsRecipe):
def print_version(self, url):
return 'http://www.printthis.clickability.com/pt/printThis?clickMap=printThis&fb=Y&url=' + url

View File

@ -9,6 +9,8 @@ import re, urlparse
class WallStreetJournal(BasicNewsRecipe):
title = 'The Wall Street Journal'
__author__ = 'JTravers'
description = 'News and current affairs.'
needs_subscription = True
max_articles_per_feed = 10
timefmt = ' [%a, %b %d, %Y]'