mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Readers Digest - no more empty articles
This commit is contained in:
parent
21ed07d178
commit
9ca405d192
@ -2,13 +2,15 @@
|
|||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
'''
|
'''
|
||||||
'''
|
'''
|
||||||
|
import re
|
||||||
|
|
||||||
from calibre.web.feeds.recipes import BasicNewsRecipe
|
from calibre.web.feeds.recipes import BasicNewsRecipe
|
||||||
|
|
||||||
|
|
||||||
class ReadersDigest(BasicNewsRecipe):
|
class ReadersDigest(BasicNewsRecipe):
|
||||||
|
|
||||||
title = 'Readers Digest'
|
title = 'Readers Digest'
|
||||||
__author__ = 'BrianG'
|
__author__ = 'BrianG, Gobelinus'
|
||||||
language = 'en'
|
language = 'en'
|
||||||
description = 'Readers Digest Feeds'
|
description = 'Readers Digest Feeds'
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
@ -41,16 +43,20 @@ class ReadersDigest(BasicNewsRecipe):
|
|||||||
('Food', 'http://www.rd.com/food/feed'),
|
('Food', 'http://www.rd.com/food/feed'),
|
||||||
('Health', 'http://www.rd.com/health/feed'),
|
('Health', 'http://www.rd.com/health/feed'),
|
||||||
('Home', 'http://www.rd.com/home/feed'),
|
('Home', 'http://www.rd.com/home/feed'),
|
||||||
('Family', 'http://www.rd.com/family/feed'),
|
# ('Family', 'http://www.rd.com/family/feed'),
|
||||||
('Money', 'http://www.rd.com/money/feed'),
|
# ('Money', 'http://www.rd.com/money/feed'),
|
||||||
('Travel', 'http://www.rd.com/travel/feed'),
|
# ('Travel', 'http://www.rd.com/travel/feed'),
|
||||||
|
('True Stories', 'http://www.rd.com/true-stories/feed'),
|
||||||
|
('Advice', 'http://www.rd.com/advice/feed'),
|
||||||
]
|
]
|
||||||
|
|
||||||
cover_url = 'http://www.rd.com/images/logo-main-rd.gif'
|
# cover_url = 'http://www.rd.com/images/logo-main-rd.gif'
|
||||||
|
|
||||||
keep_only_tags = dict(id='main-content')
|
keep_only_tags = dict(id='main')
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
{'class':['post-categories']},
|
dict(attrs={'class': re.compile('rd-article--sidebar.*')}),
|
||||||
|
dict(attrs={'class': ['rd-article--footer', 'rd-article--sharing']}),
|
||||||
|
dict(attrs={'id': ['newsletter-form-container', 'confirmation-msg-container']}),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user