This commit is contained in:
Kovid Goyal 2023-03-14 09:08:38 +05:30
parent f035eb5272
commit 2d2cea29e0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -33,7 +33,12 @@ class ElPais(BasicNewsRecipe):
remove_javascript = True remove_javascript = True
no_stylesheets = True no_stylesheets = True
extra_css = 'span._db {max-width: 100%; height: auto;} .a_m_p {font-size: .75rem;} .a_m_m {text-transform: uppercase; padding-top: 0.5rem;} div.a_md_a {text-align: center; text-transform: uppercase; font-size: .8rem;}' extra_css = '''
span._db {max-width: 100%; height: auto;}
.a_m_p {font-size: .75rem;}
.a_m_m {text-transform: uppercase; padding-top: 0.5rem;}
div.a_md_a {text-align: center; text-transform: uppercase; font-size: .8rem;}
'''
keep_only_tags = [ keep_only_tags = [
dict(attrs={'class': [ dict(attrs={'class': [
@ -93,7 +98,9 @@ class ElPais(BasicNewsRecipe):
def get_cover_url(self): def get_cover_url(self):
from datetime import date from datetime import date
cover = 'https://srv00.epimg.net/pdf/elpais/snapshot/' + str(date.today().year) + '/' + date.today().strftime('%m') + '/elpais/' + str(date.today().year) + date.today().strftime('%m') + date.today().strftime('%d') + 'Big.jpg' cover = ('https://srv00.epimg.net/pdf/elpais/snapshot/' +
str(date.today().year) + '/' + date.today().strftime('%m') + '/elpais/' +
str(date.today().year) + date.today().strftime('%m') + date.today().strftime('%d') + 'Big.jpg')
br = BasicNewsRecipe.get_browser(self) br = BasicNewsRecipe.get_browser(self)
try: try:
br.open(cover) br.open(cover)