mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
remove := syntax
This commit is contained in:
parent
84741b17df
commit
d360331af4
@ -264,8 +264,9 @@ class Economist(BasicNewsRecipe):
|
||||
return ans
|
||||
|
||||
def economist_parse_index(self, soup):
|
||||
if (tag := soup.select_one("script#__NEXT_DATA__")) is not None:
|
||||
data = json.loads(tag.string)
|
||||
script_tag = soup.select_one("script#__NEXT_DATA__")
|
||||
if script_tag is not None:
|
||||
data = json.loads(script_tag.string)
|
||||
self.cover_url = data['props']['pageProps']['content']['image']['main']['url']['canonical']
|
||||
self.log('Got cover:', self.cover_url)
|
||||
feeds = []
|
||||
|
@ -264,8 +264,9 @@ class Economist(BasicNewsRecipe):
|
||||
return ans
|
||||
|
||||
def economist_parse_index(self, soup):
|
||||
if (tag := soup.select_one("script#__NEXT_DATA__")) is not None:
|
||||
data = json.loads(tag.string)
|
||||
script_tag = soup.select_one("script#__NEXT_DATA__")
|
||||
if script_tag is not None:
|
||||
data = json.loads(script_tag.string)
|
||||
self.cover_url = data['props']['pageProps']['content']['image']['main']['url']['canonical']
|
||||
self.log('Got cover:', self.cover_url)
|
||||
feeds = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user