mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/unkn0w7n/calibre
This commit is contained in:
commit
893ebb0457
@ -112,7 +112,7 @@ class NewYorkTimes(BasicNewsRecipe):
|
||||
if use_wayback_machine and not skip_wayback:
|
||||
from calibre import browser
|
||||
return self.nyt_parser.download_url(url, browser())
|
||||
return self.index_to_soup(url)
|
||||
return self.index_to_soup(url, raw=True)
|
||||
|
||||
def preprocess_raw_html(self, raw_html, url):
|
||||
if '/interactive/' in url:
|
||||
|
@ -117,6 +117,14 @@ class tls(BasicNewsRecipe):
|
||||
|
||||
if 'bookdetails' in prim and prim['bookdetails']:
|
||||
bks += '<br>'
|
||||
for a in prim['bookdetails']:
|
||||
for x, y in a.items():
|
||||
if isinstance(y, str):
|
||||
if x == 'imageurl':
|
||||
bks += '<img src="{}">'.format(y)
|
||||
elif y:
|
||||
bks += '<div class="det">' + y + '</div>\n'
|
||||
bks += '<br>'
|
||||
else:
|
||||
prim = title = desc = label = auth = lede = bks = ''
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user