mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Le Monde
This commit is contained in:
parent
12f19a4200
commit
4e4884c91b
@ -22,13 +22,15 @@ class LeMonde(BasicNewsRecipe):
|
|||||||
#publication_type = 'newsportal'
|
#publication_type = 'newsportal'
|
||||||
extra_css = '''
|
extra_css = '''
|
||||||
h1{font-size:130%;}
|
h1{font-size:130%;}
|
||||||
|
h2{font-size:100%;}
|
||||||
|
blockquote.aside {background-color: #DDD; padding: 0.5em;}
|
||||||
.ariane{font-size:xx-small;}
|
.ariane{font-size:xx-small;}
|
||||||
.source{font-size:xx-small;}
|
.source{font-size:xx-small;}
|
||||||
#.href{font-size:xx-small;}
|
/*.href{font-size:xx-small;}*/
|
||||||
#.figcaption style{color:#666666; font-size:x-small;}
|
/*.figcaption style{color:#666666; font-size:x-small;}*/
|
||||||
#.main-article-info{font-family:Arial,Helvetica,sans-serif;}
|
/*.main-article-info{font-family:Arial,Helvetica,sans-serif;}*/
|
||||||
#full-contents{font-size:small; font-family:Arial,Helvetica,sans-serif;font-weight:normal;}
|
/*full-contents{font-size:small; font-family:Arial,Helvetica,sans-serif;font-weight:normal;}*/
|
||||||
#match-stats-summary{font-size:small; font-family:Arial,Helvetica,sans-serif;font-weight:normal;}
|
/*match-stats-summary{font-size:small; font-family:Arial,Helvetica,sans-serif;font-weight:normal;}*/
|
||||||
'''
|
'''
|
||||||
#preprocess_regexps = [(re.compile(r'<!--.*?-->', re.DOTALL), lambda m: '')]
|
#preprocess_regexps = [(re.compile(r'<!--.*?-->', re.DOTALL), lambda m: '')]
|
||||||
conversion_options = {
|
conversion_options = {
|
||||||
@ -44,6 +46,9 @@ class LeMonde(BasicNewsRecipe):
|
|||||||
filterDuplicates = True
|
filterDuplicates = True
|
||||||
|
|
||||||
def preprocess_html(self, soup):
|
def preprocess_html(self, soup):
|
||||||
|
for aside in soup.findAll('aside'):
|
||||||
|
aside.name='blockquote'
|
||||||
|
aside['class'] = "aside"
|
||||||
for alink in soup.findAll('a'):
|
for alink in soup.findAll('a'):
|
||||||
if alink.string is not None:
|
if alink.string is not None:
|
||||||
tstr = alink.string
|
tstr = alink.string
|
||||||
@ -107,7 +112,9 @@ class LeMonde(BasicNewsRecipe):
|
|||||||
]
|
]
|
||||||
|
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
dict(name='div', attrs={'class':['bloc_base meme_sujet']}),
|
dict(attrs={'class':['rubriques_liees']}),
|
||||||
|
dict(attrs={'class':['sociaux']}),
|
||||||
|
dict(attrs={'class':['bloc_base meme_sujet']}),
|
||||||
dict(name='p', attrs={'class':['lire']})
|
dict(name='p', attrs={'class':['lire']})
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user