mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
recipes: gosc_niedzielny - improve css and images
This commit is contained in:
parent
298d7cec05
commit
9a221dd0dd
@ -93,11 +93,17 @@ class GN(BasicNewsRecipe):
|
|||||||
|
|
||||||
def preprocess_html(self, soup):
|
def preprocess_html(self, soup):
|
||||||
self.append_page(soup, soup.body)
|
self.append_page(soup, soup.body)
|
||||||
|
r = soup.find(attrs={'class': 'lightbox'})
|
||||||
|
if r:
|
||||||
|
r.contents[0]['src'] = r['href']
|
||||||
return soup
|
return soup
|
||||||
|
|
||||||
def postprocess_html(self, soup, first_fetch):
|
def postprocess_html(self, soup, first_fetch):
|
||||||
for r in soup.findAll(attrs={'class': 'pgr'}):
|
for r in soup.findAll(attrs={'class': 'pgr'}):
|
||||||
r.extract()
|
r.extract()
|
||||||
|
for r in soup.findAll(attrs={'class': 'cm-i-a'}):
|
||||||
|
r.replaceWith('<div style="clear:both"></div>' +
|
||||||
|
r.prettify() + '<div style="clear:both"></div>')
|
||||||
return soup
|
return soup
|
||||||
|
|
||||||
keep_only_tags = [
|
keep_only_tags = [
|
||||||
@ -114,6 +120,6 @@ class GN(BasicNewsRecipe):
|
|||||||
extra_css = '''
|
extra_css = '''
|
||||||
h1 {font-size:150%}
|
h1 {font-size:150%}
|
||||||
p.limiter {font-size:150%; font-weight: bold}
|
p.limiter {font-size:150%; font-weight: bold}
|
||||||
span.cm-i-a {text-transform:uppercase;}
|
span.cm-i-a {text-transform:uppercase;font-size:50%}
|
||||||
span.cm-i-p {font-style:italic; font-size:70%}
|
span.cm-i-p {font-style:italic; font-size:70%;text-align:right}
|
||||||
'''
|
'''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user