mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Improve Reuters
This commit is contained in:
parent
1f903f4b70
commit
2dea2852a7
@ -25,11 +25,13 @@ class Reuters(BasicNewsRecipe):
|
||||
|
||||
keep_only_tags = [dict(name='div', attrs={'class':'column2 gridPanel grid8'})]
|
||||
|
||||
|
||||
remove_tags = [dict(name='div', attrs={'id':['recommendedArticles','relatedNews','relatedVideo','relatedFactboxes']}),
|
||||
dict(name='p', attrs={'class':['relatedTopics']}),
|
||||
dict(name='a', attrs={'id':['fullSizeLink']}),
|
||||
dict(name='div', attrs={'class':['photoNav','relatedTopicButtons','articleComments','gridPanel grid8','footerHalf gridPanel grid1','gridPanel grid2','gridPanel grid3']}),]
|
||||
dict(name='div', attrs={'class':['photoNav','relatedTopicButtons','articleComments','gridPanel grid8','footerHalf gridPanel grid1','gridPanel grid2','gridPanel grid3']}),
|
||||
# Remove the Tweet, Share this, Email and Print links below article title too!
|
||||
dict(name='div', attrs={'class':['columnRight']}),
|
||||
]
|
||||
|
||||
preprocess_regexps = [ (re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in
|
||||
[
|
||||
@ -40,9 +42,7 @@ class Reuters(BasicNewsRecipe):
|
||||
(r'<body>.*?<div class="contentBand">', lambda match : '<body>'),
|
||||
(r'<h3>Share:</h3>.*?</body>', lambda match : '<!-- END:: Shared Module id=36615 --></body>'),
|
||||
(r'<div id="atools" class="articleTools">.*?<div class="linebreak">', lambda match : '<div class="linebreak">'),
|
||||
]
|
||||
]
|
||||
|
||||
]]
|
||||
|
||||
|
||||
feeds = [ ('Top Stories', 'http://feeds.reuters.com/reuters/topNews?format=xml'),
|
||||
@ -54,4 +54,3 @@ class Reuters(BasicNewsRecipe):
|
||||
('Technology News', 'http://feeds.reuters.com/reuters/technologyNews?format=xml'),
|
||||
('Oddly Enough News', 'http://feeds.reuters.com/reuters/oddlyEnoughNews?format=xml')
|
||||
]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user