mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
0396daa644
commit
6c9e2d14a2
@ -103,7 +103,7 @@ class IndiaToday(BasicNewsRecipe):
|
|||||||
if 'description_short' in data:
|
if 'description_short' in data:
|
||||||
desc = '<p id="sub-h">' + data['description_short'] + '</p>\n'
|
desc = '<p id="sub-h">' + data['description_short'] + '</p>\n'
|
||||||
if data.get('author'):
|
if data.get('author'):
|
||||||
author = ''.join([names['title'] for names in data['author']])
|
author = ', '.join([names['title'] for names in data['author']])
|
||||||
if 'city' in data:
|
if 'city' in data:
|
||||||
city = data['city']
|
city = data['city']
|
||||||
if 'datetime_updated' in data:
|
if 'datetime_updated' in data:
|
||||||
|
@ -26,10 +26,9 @@ class ScientificAmerican(BasicNewsRecipe):
|
|||||||
extra_css = """
|
extra_css = """
|
||||||
[class^="article_dek-"] { font-style:italic; color:#202020; }
|
[class^="article_dek-"] { font-style:italic; color:#202020; }
|
||||||
[class^="article_authors-"] {font-size:small; color:#202020; }
|
[class^="article_authors-"] {font-size:small; color:#202020; }
|
||||||
[class^="article__image-"] { font-size:small; text-align:center; }
|
[class^="article__image-"], [class^="lead_image-"], .calibre-nuked-tag-figcaption { font-size:small; }
|
||||||
[class^="lead_image-"] { font-size:small; text-align:center; }
|
|
||||||
[class^="bio-"] { font-size:small; color:#404040; }
|
[class^="bio-"] { font-size:small; color:#404040; }
|
||||||
em { color:#202020; }
|
em, blockquote { color:#202020; }
|
||||||
"""
|
"""
|
||||||
|
|
||||||
needs_subscription = "optional"
|
needs_subscription = "optional"
|
||||||
@ -44,9 +43,11 @@ class ScientificAmerican(BasicNewsRecipe):
|
|||||||
]
|
]
|
||||||
|
|
||||||
def preprocess_html(self, soup):
|
def preprocess_html(self, soup):
|
||||||
|
for h2 in soup.findAll(['h2', 'h3']):
|
||||||
|
h2.name = 'h4'
|
||||||
for fig in soup.findAll('figcaption'):
|
for fig in soup.findAll('figcaption'):
|
||||||
for p in fig.findAll(['p', 'div']):
|
for p in fig.findAll('p'):
|
||||||
p.name = 'span'
|
p.name = 'div'
|
||||||
res = '?w=600'
|
res = '?w=600'
|
||||||
w = self.recipe_specific_options.get('res')
|
w = self.recipe_specific_options.get('res')
|
||||||
if w and isinstance(w, str):
|
if w and isinstance(w, str):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user