Update Wired Daily Edition

This commit is contained in:
Kovid Goyal 2020-05-24 11:36:40 +05:30
parent 54d4349012
commit 849bdc6040
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -16,10 +16,14 @@ def classes(classes):
class WiredDailyNews(BasicNewsRecipe): class WiredDailyNews(BasicNewsRecipe):
title = 'Wired Daily Edition' title = 'Wired Daily Edition'
__author__ = 'Darko Miletic' __author__ = 'Darko Miletic, PatStapleton(update 2020-05-24)'
description = ('Wired is a full-color monthly American magazine, published in both print ' description = (
'and online editions, that reports on how emerging technologies affect culture,' 'Wired is a full-color monthly American magazine, published in both print'
'the economy and politics.') ' and online editions, that reports on how emerging technologies affect culture,'
' the economy and politics.'
)
masthead_url = 'https://www.wired.com/images/logos/apple-touch-icon.png'
cover_url = 'https://www.wired.com/images/logos/wired.png'
publisher = 'Conde Nast' publisher = 'Conde Nast'
category = 'news, IT, computers, technology' category = 'news, IT, computers, technology'
oldest_article = 2 oldest_article = 2
@ -31,42 +35,48 @@ class WiredDailyNews(BasicNewsRecipe):
ignore_duplicate_articles = {'url'} ignore_duplicate_articles = {'url'}
remove_empty_feeds = True remove_empty_feeds = True
publication_type = 'newsportal' publication_type = 'newsportal'
extra_css = """ extra_css = """
.entry-header{ .entry-header{
text-transform: uppercase; text-transform: uppercase;
vertical-align: baseline; vertical-align: baseline;
display: inline; display: inline;
} }
ul li{display: inline} ul li{display: inline}
""" """
remove_tags = [ remove_tags = [
classes('related-cne-video-component tags-component podcast_storyboard inset-left-component'), classes('related-cne-video-component tags-component podcast_42 storyboard inset-left-component social-icons'),
dict(name=['meta', 'link']), dict(name=['meta', 'link', 'aside']),
dict(id=['sharing', 'social', 'article-tags', 'sidebar']), dict(id=['sharing', 'social', 'article-tags', 'sidebar']),
] ]
keep_only_tags = [ keep_only_tags = [
dict(name='main', attrs={'class': lambda x: x and 'article-main-component__content' in x}), dict(name='article', attrs={'class': 'article main-content'}),
] ]
remove_attributes = ['srcset'] remove_attributes = ['srcset']
handle_gzip = True handle_gzip = True
feeds = [ feeds = [
(u'Top Stories', u'https://www.wired.com/feed/'), (u'Top Stories', u'https://www.wired.com/feed/rss'),
(u'Business', u'https://www.wired.com/category/business/feed/'), (u'Business', u'https://www.wired.com/feed/category/business/latest/rss'),
(u'Design', u'https://www.wired.com/category/design/feed/'), (u'Culture', u'https://www.wired.com/feed/category/culture/latest/rss'),
(u'Entertainment', u'https://www.wired.com/category/underwire/feed/'), (u'Gear', u'https://www.wired.com/feed/category/gear/latest/rss'),
(u'Tech', u'https://www.wired.com/category/gear/feed/'), (u'Ideas', u'https://www.wired.com/feed/category/ideas/latest/rss'),
(u'Product Reviews', u'https://www.wired.com/category/reviews/feed/'), (u'Science', u'https://www.wired.com/feed/category/science/latest/rss'),
(u'Science', u'https://www.wired.com/category/science/feed/'), (u'Security', u'https://www.wired.com/feed/category/security/latest/rss'),
(u'Science Blogs', u'https://www.wired.com/category/science/science-blogs/feed/'), (
(u'Security', u'https://www.wired.com/category/security/feed/'), u'Transportation',
(u'Transportation', u'https://www.wired.com/category/transportation/feed/'), u'https://www.wired.com/feed/category/transportation/latest/rss'
(u'Photo', u'https://www.wired.com/category/photo/feed/'), ),
(
u'Backchannel',
u'https://www.wired.com/feed/category/backchannel/latest/rss'
),
(u'WIRED Guides', u'https://www.wired.com/feed/tag/wired-guide/latest/rss'),
# (u'Photo', u'https://www.wired.com/feed/category/photo/latest/rss'),
] ]
def get_article_url(self, article): def get_article_url(self, article):
return article.get('link', None) return article.get('link', None)
# Wired changes the content it delivers based on cookies, so the # Wired changes the content it delivers based on cookies, so the
# following ensures that we send no cookies # following ensures that we send no cookies