mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
News download: Fix regression that led to spurious error messages when downloading multipage articles
This commit is contained in:
parent
875b7b85b3
commit
a4e398d73c
@ -336,7 +336,7 @@ class NYTimes(BasicNewsRecipe):
|
||||
self.log(">>> No class:'columnGroup first' found <<<")
|
||||
# Change class="kicker" to <h3>
|
||||
kicker = soup.find(True, {'class':'kicker'})
|
||||
if kicker and kicker.contents[0]:
|
||||
if kicker and kicker.contents and kicker.contents[0]:
|
||||
h3Tag = Tag(soup, "h3")
|
||||
h3Tag.insert(0, self.fixChars(self.tag_to_string(kicker,
|
||||
use_alt=False)))
|
||||
@ -460,7 +460,9 @@ class NYTimes(BasicNewsRecipe):
|
||||
return self.massageNCXText(self.tag_to_string(p,use_alt=False))
|
||||
return None
|
||||
|
||||
if not article.author:
|
||||
article.author = extract_author(soup)
|
||||
if not article.summary:
|
||||
article.summary = article.text_summary = extract_description(soup)
|
||||
|
||||
def strip_anchors(self,soup):
|
||||
|
@ -683,6 +683,8 @@ class BasicNewsRecipe(Recipe):
|
||||
base.extract()
|
||||
|
||||
ans = self.postprocess_html(soup, first_fetch)
|
||||
if job_info:
|
||||
url, f, a, feed_len = job_info
|
||||
try:
|
||||
article = self.feed_objects[f].articles[a]
|
||||
except:
|
||||
|
Loading…
x
Reference in New Issue
Block a user