mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-05 08:40:13 -04:00
Update Wired Daily
This commit is contained in:
parent
ea9d1918c1
commit
6101940277
@ -9,7 +9,9 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
|||||||
class WiredDailyNews(BasicNewsRecipe):
|
class WiredDailyNews(BasicNewsRecipe):
|
||||||
title = 'Wired Daily Edition'
|
title = 'Wired Daily Edition'
|
||||||
__author__ = 'Darko Miletic'
|
__author__ = 'Darko Miletic'
|
||||||
description = 'Wired is a full-color monthly American magazine, published in both print and online editions, that reports on how emerging technologies affect culture, the economy and politics.'
|
description = ('Wired is a full-color monthly American magazine, published in both print '
|
||||||
|
'and online editions, that reports on how emerging technologies affect culture,'
|
||||||
|
'the economy and politics.')
|
||||||
publisher = 'Conde Nast'
|
publisher = 'Conde Nast'
|
||||||
category = 'news, IT, computers, technology'
|
category = 'news, IT, computers, technology'
|
||||||
oldest_article = 2
|
oldest_article = 2
|
||||||
@ -21,57 +23,47 @@ 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'
|
||||||
masthead_url = 'http://www.wired.com/images/home/wired_logo.gif'
|
|
||||||
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}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
conversion_options = {
|
|
||||||
'comment' : description
|
|
||||||
, 'tags' : category
|
|
||||||
, 'publisher' : publisher
|
|
||||||
, 'language' : language
|
|
||||||
}
|
|
||||||
|
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
dict(name=['meta','link']),
|
dict(name=['meta','link']),
|
||||||
dict(name='div', attrs={'class':'podcast_storyboard'})
|
dict(name='div', attrs={'class':'podcast_storyboard'}),
|
||||||
|
dict(id='article-tags'),
|
||||||
]
|
]
|
||||||
keep_only_tags=[
|
keep_only_tags=[
|
||||||
dict(name='h1' , attrs={'id' :'headline' }),
|
dict(attrs={'data-js':['post', 'postHeader']}),
|
||||||
dict(name='ul' , attrs={'class':'entry-header'}),
|
]
|
||||||
dict(name='div', attrs={'class':'entry' })
|
|
||||||
]
|
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Top Stories' , u'http://feeds.wired.com/wired/index' )
|
(u'Top Stories' , u'http://feeds.wired.com/wired/index')
|
||||||
,(u'Product reviews' , u'http://feeds.wired.com/WiredReviews' )
|
,(u'Product reviews' , u'http://feeds.wired.com/WiredReviews')
|
||||||
,(u'Autopia' , u'http://feeds.wired.com/wiredautopia' )
|
,(u'Autopia' , u'http://feeds.wired.com/wiredautopia')
|
||||||
,(u'Business' , u'http://feeds.wired.com/wiredbusinessblog')
|
,(u'Business' , u'http://feeds.wired.com/wiredbusinessblog')
|
||||||
,(u'Danger Room' , u'http://feeds.wired.com/WiredDangerRoom' )
|
,(u'Danger Room' , u'http://feeds.wired.com/WiredDangerRoom')
|
||||||
,(u'Gadget Lab' , u'http://feeds.wired.com/GearFactor' )
|
,(u'Gadget Lab' , u'http://feeds.wired.com/GearFactor')
|
||||||
,(u'Game Life' , u'http://feeds.wired.com/Gamelife' )
|
,(u'Game Life' , u'http://feeds.wired.com/Gamelife')
|
||||||
,(u'GeekMom' , u'http://feeds.wired.com/wiredgeekmom/' )
|
,(u'GeekMom' , u'http://feeds.wired.com/wiredgeekmom/')
|
||||||
,(u'Innovation Insights', u'http://feeds.wired.com/wiredinsights' )
|
,(u'Innovation Insights', u'http://feeds.wired.com/wiredinsights')
|
||||||
,(u'Opinion' , u'http://feeds.wired.com/wiredopinion/' )
|
,(u'Opinion' , u'http://feeds.wired.com/wiredopinion/')
|
||||||
,(u'Playbook' , u'http://feeds.wired.com/wiredplaybook/' )
|
,(u'Playbook' , u'http://feeds.wired.com/wiredplaybook/')
|
||||||
,(u'This day in Tech' , u'http://feeds.wired.com/ThisDayInTech' )
|
,(u'This day in Tech' , u'http://feeds.wired.com/ThisDayInTech')
|
||||||
,(u'Threat level' , u'http://feeds.wired.com/wired27b' )
|
,(u'Threat level' , u'http://feeds.wired.com/wired27b')
|
||||||
,(u'Design' , u'http://feeds.wired.com/wired/design' )
|
,(u'Design' , u'http://feeds.wired.com/wired/design')
|
||||||
,(u'Underwire' , u'http://feeds.wired.com/wiredunderwire' )
|
,(u'Underwire' , u'http://feeds.wired.com/wiredunderwire')
|
||||||
,(u'Enterprise' , u'http://feeds.wired.com/wiredenterprise/' )
|
,(u'Enterprise' , u'http://feeds.wired.com/wiredenterprise/')
|
||||||
,(u'Science' , u'http://feeds.wired.com/wiredscience' )
|
,(u'Science' , u'http://feeds.wired.com/wiredscience')
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_article_url(self, article):
|
def get_article_url(self, article):
|
||||||
url = article.get('guid', None)
|
url = article.get('guid', None)
|
||||||
try:
|
try:
|
||||||
return self.browser.open_novisit(url).geturl() # resolve redirect.
|
return self.browser.open_novisit(url).geturl() # resolve redirect.
|
||||||
except:
|
except:
|
||||||
return url
|
return url
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user