mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix L'Espresso
This commit is contained in:
parent
36e40ee553
commit
ad278c5638
@ -11,7 +11,7 @@ __description__ = 'Italian weekly magazine'
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class Espresso(BasicNewsRecipe):
|
||||
__author__ = 'Lorenzo Vigentini, Gabriele Marini'
|
||||
__author__ = 'Lorenzo Vigentini, Gabriele Marini, Krittika Goyal'
|
||||
description = 'Italian weekly magazine'
|
||||
|
||||
cover_url = 'http://espresso.repubblica.it/images/logo_espresso.gif'
|
||||
@ -26,10 +26,9 @@ class Espresso(BasicNewsRecipe):
|
||||
oldest_article = 16
|
||||
max_articles_per_feed = 100
|
||||
use_embedded_content = False
|
||||
recursion = 10
|
||||
|
||||
remove_javascript = True
|
||||
no_stylesheets = True
|
||||
auto_cleanup = True
|
||||
|
||||
|
||||
feeds = [
|
||||
@ -42,36 +41,3 @@ class Espresso(BasicNewsRecipe):
|
||||
(u'Chiesa: HomePage', u'http://data.kataweb.it/rss/chiesa/homepage/it'),
|
||||
(u'Chiesa: Speciali e Focus', u'http://data.kataweb.it/rss/chiesa/speciali_e_focus/it')
|
||||
]
|
||||
|
||||
|
||||
def print_version(self,url):
|
||||
print url[7:25]
|
||||
if url[7:25] == 'temi.repubblica.it':
|
||||
return url + '/?printpage=undefined'
|
||||
elif url[7:25] == 'www.chiesa.espress':
|
||||
return url
|
||||
return url + '/&print=true'
|
||||
|
||||
|
||||
keep_only_tags = [
|
||||
dict(name='div', attrs={'class':['testo','copertina','occhiello','firma','didascalia','content-second-right','detail-articles','titolo-local','generic-articles']}),
|
||||
dict(name='div', attrs={'class':['generic-articles','summary','detail-articles']}),
|
||||
dict(name='div', attrs={'id':['content-second-right','content2']})
|
||||
]
|
||||
|
||||
remove_tags = [
|
||||
dict(name='div',attrs={'class':['servizi','aggiungi','label-web','bottom-mobile','box-abbonamenti','box-cerca','big','little','stampaweb']}),
|
||||
dict(name='div',attrs={'id':['topheader','header','navigation-new','navigation','content-second-left','menutext']}),
|
||||
dict(name='ul',attrs={'id':'user-utility'}),
|
||||
dict(name=['script','noscript','iframe'])
|
||||
]
|
||||
# extra_css = '''
|
||||
# h1 {font-family:Times New Roman,"Trebuchet MS",Arial,Helvetica,sans-serif; font-size:24px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:bold; line-height:18px;}
|
||||
# h2 {font-family:Times New Roman, "Trebuchet MS",Arial,Helvetica,sans-serif; font-size:18px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:bold; line-height:16px; }
|
||||
# h3 {color:#333333;font-family:Times New Roman, "Trebuchet MS",Arial,Helvetica,sans-serif; font-size:16px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:bold; line-height:14px;}
|
||||
# h4 {color:#333333; font-family:Times New Roman, "Trebuchet MS",Arial,Helvetica,sans-serif;font-size:16px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:bold; line-height:14px; }
|
||||
# h5 {color:#333333; font-family:Times New Roman, "Trebuchet MS",Arial,Helvetica,sans-serif; font-size:12px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:bold; line-height:14px; text-transform:uppercase;}
|
||||
# .firma {color:#333333;font-family:Times New Roman, "Trebuchet MS",Arial,Helvetica,sans-serif;font-size:12px; font-size-adjust:none; font-stretch:normal; font-style:italic; font-variant:normal; font-weight:bold; line-height:15px; text-decoration:none;}
|
||||
# .testo {font-family:Times New Roman, "Trebuchet MS",Arial,Helvetica,sans-serif; font-size:10px;}
|
||||
# '''
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user