mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
New recipe for The San Jose Mercury News by Darko Miletic
This commit is contained in:
parent
10ecd551f6
commit
f5b9db73fe
BIN
resources/images/news/sanjosemercurynews.png
Normal file
BIN
resources/images/news/sanjosemercurynews.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 561 B |
@ -59,7 +59,7 @@ recipe_modules = ['recipe_' + r for r in (
|
|||||||
'intelligencer', 'theoldfoodie', 'hln_be', 'honvedelem',
|
'intelligencer', 'theoldfoodie', 'hln_be', 'honvedelem',
|
||||||
'the_new_republic', 'philly', 'salon', 'tweakers', 'smashing',
|
'the_new_republic', 'philly', 'salon', 'tweakers', 'smashing',
|
||||||
'thestar', 'business_standard', 'lemonde_dip', 'javalobby',
|
'thestar', 'business_standard', 'lemonde_dip', 'javalobby',
|
||||||
'serverside', 'infoworld'
|
'serverside', 'infoworld', 'sanjosemercurynews',
|
||||||
)]
|
)]
|
||||||
|
|
||||||
|
|
||||||
|
47
src/calibre/web/feeds/recipes/recipe_sanjosemercurynews.py
Normal file
47
src/calibre/web/feeds/recipes/recipe_sanjosemercurynews.py
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
|
'''
|
||||||
|
www.mercurynews.com
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class MercuryNews(BasicNewsRecipe):
|
||||||
|
title = 'San Jose Mercury News'
|
||||||
|
__author__ = 'Darko Miletic'
|
||||||
|
description = 'News from San Jose'
|
||||||
|
publisher = 'San Jose Mercury News'
|
||||||
|
category = 'news, politics, USA, San Jose, California'
|
||||||
|
oldest_article = 2
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
no_stylesheets = True
|
||||||
|
use_embedded_content = False
|
||||||
|
encoding = 'utf-8'
|
||||||
|
language = 'en'
|
||||||
|
|
||||||
|
conversion_options = {
|
||||||
|
'comment' : description
|
||||||
|
, 'tags' : category
|
||||||
|
, 'publisher' : publisher
|
||||||
|
, 'language' : language
|
||||||
|
}
|
||||||
|
|
||||||
|
keep_only_tags =[
|
||||||
|
dict(name='h1', attrs={'id':'articleTitle'})
|
||||||
|
,dict(name='div', attrs={'id':'articleBody'})
|
||||||
|
]
|
||||||
|
remove_tags = [
|
||||||
|
dict(name='div',attrs={'class':'articleEmbeddedAdBox'})
|
||||||
|
,dict(name=['link','iframe','object'])
|
||||||
|
,dict(name='div',attrs={'id':'articleViewerGroup'})
|
||||||
|
]
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
(u'News' , u'http://feeds.mercurynews.com/mngi/rss/CustomRssServlet/568/200735.xml')
|
||||||
|
,(u'Politics' , u'http://feeds.mercurynews.com/mngi/rss/CustomRssServlet/568/200740.xml')
|
||||||
|
,(u'Local News', u'http://feeds.mercurynews.com/mngi/rss/CustomRssServlet/568/200748.xml')
|
||||||
|
,(u'Editorials', u'http://feeds.mercurynews.com/mngi/rss/CustomRssServlet/568/200766.xml')
|
||||||
|
,(u'Opinion' , u'http://feeds.mercurynews.com/mngi/rss/CustomRssServlet/568/200224.xml')
|
||||||
|
]
|
Loading…
x
Reference in New Issue
Block a user