mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
-Trim down the unknown language recipe list
This commit is contained in:
parent
b589f00b3b
commit
70a254267c
@ -12,26 +12,27 @@ class AlJazeera(BasicNewsRecipe):
|
|||||||
title = 'Al Jazeera in English'
|
title = 'Al Jazeera in English'
|
||||||
__author__ = 'Darko Miletic'
|
__author__ = 'Darko Miletic'
|
||||||
description = 'News from Middle East'
|
description = 'News from Middle East'
|
||||||
|
language = _('English')
|
||||||
publisher = 'Al Jazeera'
|
publisher = 'Al Jazeera'
|
||||||
category = 'news, politics, middle east'
|
category = 'news, politics, middle east'
|
||||||
simultaneous_downloads = 1
|
simultaneous_downloads = 1
|
||||||
delay = 4
|
delay = 4
|
||||||
oldest_article = 1
|
oldest_article = 1
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
encoding = 'iso-8859-1'
|
encoding = 'iso-8859-1'
|
||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
|
|
||||||
html2lrf_options = [
|
html2lrf_options = [
|
||||||
'--comment', description
|
'--comment', description
|
||||||
, '--category', category
|
, '--category', category
|
||||||
, '--publisher', publisher
|
, '--publisher', publisher
|
||||||
, '--ignore-tables'
|
, '--ignore-tables'
|
||||||
]
|
]
|
||||||
|
|
||||||
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\nlinearize_table=True'
|
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\nlinearize_table=True'
|
||||||
|
|
||||||
keep_only_tags = [dict(name='div', attrs={'id':'ctl00_divContent'})]
|
keep_only_tags = [dict(name='div', attrs={'id':'ctl00_divContent'})]
|
||||||
|
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
|
@ -12,9 +12,10 @@ class Azstarnet(BasicNewsRecipe):
|
|||||||
title = 'Arizona Daily Star'
|
title = 'Arizona Daily Star'
|
||||||
__author__ = 'Darko Miletic'
|
__author__ = 'Darko Miletic'
|
||||||
description = 'news from Arizona'
|
description = 'news from Arizona'
|
||||||
|
language = _('English')
|
||||||
publisher = 'azstarnet.com'
|
publisher = 'azstarnet.com'
|
||||||
category = 'news, politics, Arizona, USA'
|
category = 'news, politics, Arizona, USA'
|
||||||
delay = 1
|
delay = 1
|
||||||
oldest_article = 1
|
oldest_article = 1
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
@ -28,8 +29,8 @@ class Azstarnet(BasicNewsRecipe):
|
|||||||
, '--category', category
|
, '--category', category
|
||||||
, '--publisher', publisher
|
, '--publisher', publisher
|
||||||
]
|
]
|
||||||
|
|
||||||
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"'
|
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"'
|
||||||
|
|
||||||
def get_browser(self):
|
def get_browser(self):
|
||||||
br = BasicNewsRecipe.get_browser()
|
br = BasicNewsRecipe.get_browser()
|
||||||
@ -40,8 +41,8 @@ class Azstarnet(BasicNewsRecipe):
|
|||||||
br['pass' ] = self.password
|
br['pass' ] = self.password
|
||||||
br.submit()
|
br.submit()
|
||||||
return br
|
return br
|
||||||
|
|
||||||
|
|
||||||
keep_only_tags = [dict(name='div', attrs={'id':'storycontent'})]
|
keep_only_tags = [dict(name='div', attrs={'id':'storycontent'})]
|
||||||
|
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
@ -49,15 +50,15 @@ class Azstarnet(BasicNewsRecipe):
|
|||||||
,dict(name='div',attrs={'class':'bannerinstory'})
|
,dict(name='div',attrs={'class':'bannerinstory'})
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
feeds = [(u'Tucson Region', u'http://rss.azstarnet.com/index.php?site=metro')]
|
feeds = [(u'Tucson Region', u'http://rss.azstarnet.com/index.php?site=metro')]
|
||||||
|
|
||||||
def preprocess_html(self, soup):
|
def preprocess_html(self, soup):
|
||||||
soup.html['dir' ] = 'ltr'
|
soup.html['dir' ] = 'ltr'
|
||||||
soup.html['lang'] = 'en-US'
|
soup.html['lang'] = 'en-US'
|
||||||
mtag = '\n<meta http-equiv="Content-Language" content="en-US"/>\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n'
|
mtag = '\n<meta http-equiv="Content-Language" content="en-US"/>\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n'
|
||||||
soup.head.insert(0,mtag)
|
soup.head.insert(0,mtag)
|
||||||
for item in soup.findAll(style=True):
|
for item in soup.findAll(style=True):
|
||||||
del item['style']
|
del item['style']
|
||||||
return soup
|
return soup
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ class CodingHorror(BasicNewsRecipe):
|
|||||||
description = 'programming and human factors - Jeff Atwood'
|
description = 'programming and human factors - Jeff Atwood'
|
||||||
category = 'blog, programming'
|
category = 'blog, programming'
|
||||||
publisher = 'Jeff Atwood'
|
publisher = 'Jeff Atwood'
|
||||||
|
language = _('English')
|
||||||
author = 'Jeff Atwood'
|
author = 'Jeff Atwood'
|
||||||
oldest_article = 30
|
oldest_article = 30
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
|
@ -16,6 +16,7 @@ class Sueddeutsche(BasicNewsRecipe):
|
|||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
timefmt = ' [%a %d %b %Y]'
|
timefmt = ' [%a %d %b %Y]'
|
||||||
max_articles_per_feed = 50
|
max_articles_per_feed = 50
|
||||||
|
language = _('English')
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
html2epub_options = 'linearize_tables = True\nbase_font_size2=14'
|
html2epub_options = 'linearize_tables = True\nbase_font_size2=14'
|
||||||
html2lrf_options = ['--ignore-tables']
|
html2lrf_options = ['--ignore-tables']
|
||||||
|
@ -11,25 +11,26 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
|||||||
class MoneyNews(BasicNewsRecipe):
|
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 = 'moneynews.com'
|
||||||
category = 'news, finances, USA, business'
|
language = _('English')
|
||||||
|
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 = 'cp1252'
|
||||||
|
|
||||||
html2lrf_options = [
|
html2lrf_options = [
|
||||||
'--comment', description
|
'--comment', description
|
||||||
, '--category', category
|
, '--category', category
|
||||||
, '--publisher', publisher
|
, '--publisher', publisher
|
||||||
, '--ignore-tables'
|
, '--ignore-tables'
|
||||||
]
|
]
|
||||||
|
|
||||||
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\nlinearize_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://moneynews.newsmax.com/xml/streettalk.xml' )
|
||||||
,(u'Finance News' , u'http://moneynews.newsmax.com/xml/FinanceNews.xml' )
|
,(u'Finance News' , u'http://moneynews.newsmax.com/xml/FinanceNews.xml' )
|
||||||
,(u'Economy' , u'http://moneynews.newsmax.com/xml/economy.xml' )
|
,(u'Economy' , u'http://moneynews.newsmax.com/xml/economy.xml' )
|
||||||
@ -38,12 +39,12 @@ class MoneyNews(BasicNewsRecipe):
|
|||||||
,(u'Investing & Analysis' , u'http://moneynews.newsmax.com/xml/investing.xml' )
|
,(u'Investing & Analysis' , u'http://moneynews.newsmax.com/xml/investing.xml' )
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
keep_only_tags = [dict(name='table', attrs={'class':'copy'})]
|
keep_only_tags = [dict(name='table', attrs={'class':'copy'})]
|
||||||
|
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
dict(name='td' , attrs={'id':'article_fontsize'})
|
dict(name='td' , attrs={'id':'article_fontsize'})
|
||||||
,dict(name='table', attrs={'id':'toolbox' })
|
,dict(name='table', attrs={'id':'toolbox' })
|
||||||
,dict(name='tr' , attrs={'id':'noprint3' })
|
,dict(name='tr' , attrs={'id':'noprint3' })
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ class ScottHanselman(BasicNewsRecipe):
|
|||||||
category = "Scott, Computer, Zen, .NET, C#, Hanselman, Scott, Weblog, Diabetes, Portland, Zimbabwe, ComputerZen.com - Scott Hanselman's Musings"
|
category = "Scott, Computer, Zen, .NET, C#, Hanselman, Scott, Weblog, Diabetes, Portland, Zimbabwe, ComputerZen.com - Scott Hanselman's Musings"
|
||||||
publisher = 'Scott Hanselman'
|
publisher = 'Scott Hanselman'
|
||||||
author = 'Scott Hanselman'
|
author = 'Scott Hanselman'
|
||||||
|
language = _('English')
|
||||||
oldest_article = 30
|
oldest_article = 30
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
|
@ -15,6 +15,7 @@ class Slate(BasicNewsRecipe):
|
|||||||
title = 'Slate'
|
title = 'Slate'
|
||||||
description = 'A daily magazine on the Web, offering analysis and commentary about politics, news and culture.'
|
description = 'A daily magazine on the Web, offering analysis and commentary about politics, news and culture.'
|
||||||
__author__ = 'GRiker@hotmail.com'
|
__author__ = 'GRiker@hotmail.com'
|
||||||
|
language = _('English')
|
||||||
max_articles_per_feed = 40
|
max_articles_per_feed = 40
|
||||||
oldest_article = 7.0
|
oldest_article = 7.0
|
||||||
recursions = 0
|
recursions = 0
|
||||||
|
@ -15,6 +15,7 @@ class StackOverflowBlog(BasicNewsRecipe):
|
|||||||
category = 'blog, programming'
|
category = 'blog, programming'
|
||||||
publisher = 'StackOverflow team'
|
publisher = 'StackOverflow team'
|
||||||
oldest_article = 30
|
oldest_article = 30
|
||||||
|
language = _('English')
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
use_embedded_content = True
|
use_embedded_content = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user