mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
57a645e503
commit
6092dcda65
@ -64,11 +64,11 @@ class ft(BasicNewsRecipe):
|
|||||||
]
|
]
|
||||||
|
|
||||||
def get_cover_url(self):
|
def get_cover_url(self):
|
||||||
url = f"https://www.tomorrowspapers.co.uk/financial-times-front-page-{date.today():%Y-%m-%d}/"
|
url = f'https://www.tomorrowspapers.co.uk/financial-times-front-page-{date.today():%Y-%m-%d}/'
|
||||||
try:
|
try:
|
||||||
soup = self.index_to_soup(url)
|
soup = self.index_to_soup(url)
|
||||||
except Exception:
|
except Exception:
|
||||||
return f"https://img.kiosko.net/{date.today():%Y/%m/%d}/uk/ft_uk.750.jpg"
|
return f'https://img.kiosko.net/{date.today():%Y/%m/%d}/uk/ft_uk.750.jpg'
|
||||||
img = soup.select_one('img.attachment-full[src*="Financial-Times"]')
|
img = soup.select_one('img.attachment-full[src*="Financial-Times"]')
|
||||||
src = img['src']
|
src = img['src']
|
||||||
return src
|
return src
|
||||||
|
@ -6,8 +6,8 @@ from itertools import zip_longest
|
|||||||
from urllib.parse import quote, urlencode
|
from urllib.parse import quote, urlencode
|
||||||
|
|
||||||
from calibre import browser
|
from calibre import browser
|
||||||
from calibre.ptempfile import PersistentTemporaryFile
|
|
||||||
from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
||||||
|
from calibre.ptempfile import PersistentTemporaryFile
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe, classes
|
from calibre.web.feeds.news import BasicNewsRecipe, classes
|
||||||
|
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ class WSJ(BasicNewsRecipe):
|
|||||||
description = (
|
description = (
|
||||||
'The Print Edition of WSJ. The Wall Street Journal is your source '
|
'The Print Edition of WSJ. The Wall Street Journal is your source '
|
||||||
'for breaking news, analysis and insights from the U.S. and '
|
'for breaking news, analysis and insights from the U.S. and '
|
||||||
'around the world, the world\'s leading business and finance publication.'
|
"around the world, the world's leading business and finance publication."
|
||||||
)
|
)
|
||||||
language = 'en_US'
|
language = 'en_US'
|
||||||
masthead_url = 'https://s.wsj.net/media/wsj_amp_masthead_lg.png'
|
masthead_url = 'https://s.wsj.net/media/wsj_amp_masthead_lg.png'
|
||||||
|
@ -5,8 +5,8 @@ from itertools import zip_longest
|
|||||||
from urllib.parse import quote, urlencode
|
from urllib.parse import quote, urlencode
|
||||||
|
|
||||||
from calibre import browser
|
from calibre import browser
|
||||||
from calibre.ptempfile import PersistentTemporaryFile
|
|
||||||
from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
||||||
|
from calibre.ptempfile import PersistentTemporaryFile
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe, classes
|
from calibre.web.feeds.news import BasicNewsRecipe, classes
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user