New recipe for The Dallas Morning News by Krittika Goyal

This commit is contained in:
Kovid Goyal 2010-01-09 19:55:00 -07:00
parent 8f53391d98
commit bf0777e55b
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,28 @@
from calibre.web.feeds.news import BasicNewsRecipe
class DallasNews(BasicNewsRecipe):
title = u'The Dallas Morning News'
language = 'en'
oldest_article = 2 #days
max_articles_per_feed = 25
no_stylesheets = True
remove_tags_before = dict(name='h2', attrs={'class':'vitstoryheadline'})
remove_tags_after = dict(name='div', attrs={'style':'width: 100%; clear: right'})
remove_tags_after = dict(name='div', attrs={'id':'article_tools_bottom'})
remove_tags = [
dict(name='iframe'),
dict(name='div', attrs={'class':'biblockmore'}),
dict(name='div', attrs={'style':'width: 100%; clear: right'}),
dict(name='div', attrs={'id':'article_tools_bottom'}),
#dict(name='ul', attrs={'class':'articleTools'}),
]
feeds = [
('Latest News', 'http://www.dallasnews.com/newskiosk/rss/dallasnewslatestnews.xml'),
('Local News', 'http://www.dallasnews.com/newskiosk/rss/dallasnewslocalnews.xml'),
('Nation and World', 'http://www.dallasnews.com/newskiosk/rss/dallasnewsnationworld.xml'),
('Politics', 'http://www.dallasnews.com/newskiosk/rss/dallasnewsnationalpolitics.xml'),
('Science', 'http://www.dallasnews.com/newskiosk/rss/dallasnewsscience.xml'),
]

View File

@ -111,6 +111,7 @@ class VMInstaller(Command):
self.vm = self.VM
if not self.vmware_started():
self.start_vmware()
subprocess.call(['chmod', '-R', '+r', 'resources/recipes'])
self.start_vm()
self.download_installer()
if not self.dont_shutdown: