mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update scientific_american.recipe
This commit is contained in:
parent
da82b673f0
commit
88a49a110a
@ -98,7 +98,7 @@ class LiveMint(BasicNewsRecipe):
|
|||||||
classes(
|
classes(
|
||||||
'trendingSimilarHeight moreNews mobAppDownload label msgError msgOk taboolaHeight'
|
'trendingSimilarHeight moreNews mobAppDownload label msgError msgOk taboolaHeight'
|
||||||
' socialHolder imgbig disclamerText disqus-comment-count openinApp2 lastAdSlot'
|
' socialHolder imgbig disclamerText disqus-comment-count openinApp2 lastAdSlot'
|
||||||
' datePublish sepStory premiumSlider moreStory Joinus'
|
' datePublish sepStory premiumSlider moreStory Joinus moreAbout'
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ from datetime import datetime
|
|||||||
from os.path import splitext
|
from os.path import splitext
|
||||||
from urllib.parse import urljoin
|
from urllib.parse import urljoin
|
||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe, classes
|
from calibre.web.feeds.news import BasicNewsRecipe, prefixed_classes
|
||||||
|
|
||||||
|
|
||||||
class ScientificAmerican(BasicNewsRecipe):
|
class ScientificAmerican(BasicNewsRecipe):
|
||||||
@ -25,29 +25,23 @@ class ScientificAmerican(BasicNewsRecipe):
|
|||||||
"https://static.scientificamerican.com/sciam/assets/Image/newsletter/salogo.png"
|
"https://static.scientificamerican.com/sciam/assets/Image/newsletter/salogo.png"
|
||||||
)
|
)
|
||||||
extra_css = """
|
extra_css = """
|
||||||
.image-captioned{font-size:small;}
|
[class^="article_dek-"] { font-style:italic; color:#202020; }
|
||||||
.feature-article__byline-authors{font-size:small;}
|
[class^="article_authors-"] {font-size:small; color:#202020; }
|
||||||
.article-header__inner__category{font-size:small; color:gray;}
|
[class^="article__image-"] { font-size:small; text-align:center; }
|
||||||
.t_caption{font-size:small; text-align:center;}
|
[class^="lead_image-"] { font-size:small; text-align:center; }
|
||||||
.author-bio{font-size:small;}
|
[class^="bio-"] { font-size:small; color:#404040; }
|
||||||
.opinion-article__byline-authors{font-size:small;}
|
em { color:#202020; }
|
||||||
.article-author{font-size:small;}
|
|
||||||
[role="presentation"]{font-size:small;}
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
needs_subscription = "optional"
|
needs_subscription = "optional"
|
||||||
|
|
||||||
keep_only_tags = [
|
keep_only_tags = [
|
||||||
classes(
|
prefixed_classes(
|
||||||
"article-header article-content article-media article-author article-text feature-article--header"
|
'article_hed- article_dek- article_authors- lead_image- article__content- bio-'
|
||||||
" feature-article--header-title opinion-article__header-title author-bio"
|
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
classes(
|
dict(name=['button', 'svg', 'iframe', 'source'])
|
||||||
"aside-banner moreToExplore article-footer flex-column--25 article-author__suggested medium-up-hide"
|
|
||||||
),
|
|
||||||
dict(id=["seeAlsoLinks"]),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_browser(self, *args):
|
def get_browser(self, *args):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user