mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Merge from trunk
This commit is contained in:
commit
d39ba839e2
@ -1,26 +1,18 @@
|
|||||||
import re
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
class AmericanProspect(BasicNewsRecipe):
|
class AmericanProspect(BasicNewsRecipe):
|
||||||
title = u'American Prospect'
|
title = u'American Prospect'
|
||||||
__author__ = u'Michael Heinz'
|
__author__ = u'Michael Heinz, a.peter'
|
||||||
oldest_article = 30
|
version = 2
|
||||||
language = 'en'
|
|
||||||
max_articles_per_feed = 100
|
|
||||||
recursions = 0
|
|
||||||
no_stylesheets = True
|
|
||||||
remove_javascript = True
|
|
||||||
|
|
||||||
preprocess_regexps = [
|
oldest_article = 30
|
||||||
(re.compile(r'<body.*?<div class="pad_10L10R">', re.DOTALL|re.IGNORECASE), lambda match: '<body><div>'),
|
language = 'en'
|
||||||
(re.compile(r'</div>.*</body>', re.DOTALL|re.IGNORECASE), lambda match: '</div></body>'),
|
max_articles_per_feed = 100
|
||||||
(re.compile('\r'),lambda match: ''),
|
recursions = 0
|
||||||
(re.compile(r'<!-- .+? -->', re.DOTALL|re.IGNORECASE), lambda match: ''),
|
no_stylesheets = True
|
||||||
(re.compile(r'<link .+?>', re.DOTALL|re.IGNORECASE), lambda match: ''),
|
remove_javascript = True
|
||||||
(re.compile(r'<script.*?</script>', re.DOTALL|re.IGNORECASE), lambda match: ''),
|
|
||||||
(re.compile(r'<noscript.*?</noscript>', re.DOTALL|re.IGNORECASE), lambda match: ''),
|
keep_only_tags = [dict(name='div', attrs={'class':'pad_10L10R'})]
|
||||||
(re.compile(r'<meta .*?/>', re.DOTALL|re.IGNORECASE), lambda match: ''),
|
remove_tags = [dict(name='form'), dict(name='div', attrs={'class':['bkt_caption','sharebox noprint','badgebox']})]
|
||||||
]
|
|
||||||
|
|
||||||
feeds = [(u'Articles', u'feed://www.prospect.org/articles_rss.jsp')]
|
feeds = [(u'Articles', u'feed://www.prospect.org/articles_rss.jsp')]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user