mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update wired.it
This commit is contained in:
parent
deb87d7700
commit
cbd8e8a070
@ -1,12 +1,58 @@
|
|||||||
|
import re
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
class AdvancedUserRecipe1325758162(BasicNewsRecipe):
|
class WiredITA(BasicNewsRecipe):
|
||||||
title = u'Wired'
|
title = u'Wired.it'
|
||||||
|
oldest_article = 1
|
||||||
|
max_articles_per_feed = 50
|
||||||
|
no_stylesheets = True
|
||||||
|
use_embedded_content = False
|
||||||
|
auto_cleanup = False
|
||||||
|
encoding = 'utf8'
|
||||||
|
masthead_url = 'http://www.wired.com/images/home/wired_logo.gif'
|
||||||
|
description = 'Wired - Make in Italy. Inventa, sbaglia, innova'
|
||||||
|
publisher = 'http://www.wired.it/'
|
||||||
language = 'it'
|
language = 'it'
|
||||||
oldest_article = 7
|
__author__ = 'isspro'
|
||||||
max_articles_per_feed = 100
|
publication_type = 'magazine'
|
||||||
auto_cleanup = True
|
|
||||||
remove_tags_after = [dict(name='div', attrs={'class':'article_content'})]
|
conversion_options = {'title' : title,
|
||||||
feeds = [(u'Wired', u'http://www.wired.it/rss.xml')]
|
'comments' : description,
|
||||||
__author__ = 'faber1971'
|
'language' : language,
|
||||||
description = 'An American magazine that reports on how new technology affects culture, the economy, and politics'
|
'publisher' : publisher,
|
||||||
|
'authors' : title,
|
||||||
|
'smarten_punctuation' : True
|
||||||
|
}
|
||||||
|
|
||||||
|
keep_only_tags = [
|
||||||
|
dict(name='div', attrs={'id':'main-article'})
|
||||||
|
]
|
||||||
|
|
||||||
|
remove_tags = [
|
||||||
|
dict(name='img', attrs={'class':'avatar img-circle'}),
|
||||||
|
dict(name='div', attrs={'class':'topics'}),
|
||||||
|
dict(name='div', attrs={'class':'social-share hidden-lg'}),
|
||||||
|
dict(name='span', attrs={'class':'label'})
|
||||||
|
]
|
||||||
|
|
||||||
|
extra_css = '''
|
||||||
|
h1 {font-size:x-large;}
|
||||||
|
p.lead {font-size:medium;}
|
||||||
|
.who {line-height: 0pt; margin: 0pt;}
|
||||||
|
'''
|
||||||
|
|
||||||
|
preprocess_regexps = [
|
||||||
|
(re.compile(r'Pubblicato'), lambda match: '')
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
feeds = [(u'Attualit\xe0', u'http://www.wired.it/attualita/feed/'),
|
||||||
|
(u'Internet','http://www.wired.it/internet/feed/'),
|
||||||
|
(u'Gadget','http://www.wired.it/gadget/feed/'),
|
||||||
|
(u'Mobile','http://www.wired.it/mobile/feed/'),
|
||||||
|
(u'Scienza','http://www.wired.it/scienza/feed/'),
|
||||||
|
(u'Economia','http://www.wired.it/economia/feed/'),
|
||||||
|
(u'LifeStyle','http://www.wired.it/lifestyle/feed/'),
|
||||||
|
(u'Play','http://www.wired.it/play/feed/'),
|
||||||
|
|
||||||
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user