mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #906935 (Updated recipe for moneynews.com)
This commit is contained in:
parent
7460ad6491
commit
4da86c99cb
BIN
recipes/icons/moneynews.png
Normal file
BIN
recipes/icons/moneynews.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 914 B |
@ -1,9 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
|
__copyright__ = '2009-2011, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
'''
|
'''
|
||||||
moneynews.newsmax.com
|
www.moneynews.com
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
@ -12,40 +10,40 @@ class MoneyNews(BasicNewsRecipe):
|
|||||||
title = 'Moneynews.com'
|
title = 'Moneynews.com'
|
||||||
__author__ = 'Darko Miletic'
|
__author__ = 'Darko Miletic'
|
||||||
description = 'Financial news worldwide'
|
description = 'Financial news worldwide'
|
||||||
publisher = 'moneynews.com'
|
publisher = 'Newsmax.com'
|
||||||
language = 'en'
|
language = 'en'
|
||||||
|
|
||||||
category = 'news, finances, USA, business'
|
category = 'news, finances, USA, business'
|
||||||
oldest_article = 2
|
oldest_article = 2
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
encoding = 'cp1252'
|
encoding = 'utf8'
|
||||||
|
extra_css = 'img{display: block} body{font-family: Arial, Helvetica, sans-serif}'
|
||||||
|
|
||||||
html2lrf_options = [
|
conversion_options = {
|
||||||
'--comment', description
|
'comment' : description
|
||||||
, '--category', category
|
, 'tags' : category
|
||||||
, '--publisher', publisher
|
, 'publisher' : publisher
|
||||||
, '--ignore-tables'
|
, 'language' : language
|
||||||
]
|
, 'linearize_tables' : True
|
||||||
|
}
|
||||||
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\nlinearize_tables=True'
|
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Street Talk' , u'http://moneynews.newsmax.com/xml/streettalk.xml' )
|
(u'Street Talk' , u'http://www.moneynews.com/rss/StreetTalk/8.xml' )
|
||||||
,(u'Finance News' , u'http://moneynews.newsmax.com/xml/FinanceNews.xml' )
|
,(u'Finance News' , u'http://www.moneynews.com/rss/FinanceNews/4.xml' )
|
||||||
,(u'Economy' , u'http://moneynews.newsmax.com/xml/economy.xml' )
|
,(u'Economy' , u'http://www.moneynews.com/rss/Economy/2.xml' )
|
||||||
,(u'Companies' , u'http://moneynews.newsmax.com/xml/companies.xml' )
|
,(u'Companies' , u'http://www.moneynews.com/rss/Companies/6.xml' )
|
||||||
,(u'Markets' , u'http://moneynews.newsmax.com/xml/Markets.xml' )
|
,(u'Markets' , u'http://www.moneynews.com/rss/Markets/7.xml' )
|
||||||
,(u'Investing & Analysis' , u'http://moneynews.newsmax.com/xml/investing.xml' )
|
,(u'Investing & Analysis' , u'http://www.moneynews.com/rss/InvestingAnalysis/17.xml')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'class':'copy'})]
|
||||||
keep_only_tags = [dict(name='table', attrs={'class':'copy'})]
|
|
||||||
|
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
dict(name='td' , attrs={'id':'article_fontsize'})
|
dict(attrs={'class':['MsoNormal', 'MsoNoSpacing']}),
|
||||||
,dict(name='table', attrs={'id':'toolbox' })
|
dict(name=['object','link','embed','form','meta'])
|
||||||
,dict(name='tr' , attrs={'id':'noprint3' })
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def print_version(self, url):
|
||||||
|
nodeid = url.rpartition('/')[2]
|
||||||
|
return 'http://www.moneynews.com/PrintTemplate?nodeid=' + nodeid
|
||||||
|
Loading…
x
Reference in New Issue
Block a user