mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Private Eye
Fix #1782759 [Private Eye news fetch fails](https://bugs.launchpad.net/calibre/+bug/1782759)
This commit is contained in:
parent
062c0ba07d
commit
2f915e33f6
@ -165,7 +165,7 @@ class PrivateEyeRecipe(BasicNewsRecipe):
|
|||||||
current_section = piece.string
|
current_section = piece.string
|
||||||
elif tag_class == ('a', 'header'):
|
elif tag_class == ('a', 'header'):
|
||||||
self.add_article(title, url, r"\r\n".join(descriptions))
|
self.add_article(title, url, r"\r\n".join(descriptions))
|
||||||
title = piece.string.rstrip(u' »').strip()
|
title = self.tag_to_string(piece).rstrip(u' »').strip()
|
||||||
url = self.fix_url(piece.get('href', ''))
|
url = self.fix_url(piece.get('href', ''))
|
||||||
descriptions = []
|
descriptions = []
|
||||||
else:
|
else:
|
||||||
@ -198,7 +198,7 @@ class PrivateEyeRecipe(BasicNewsRecipe):
|
|||||||
url = self.fix_url(title_tag.get('href', ''))
|
url = self.fix_url(title_tag.get('href', ''))
|
||||||
desc_tag = more.find('a', {'class': 'header'})
|
desc_tag = more.find('a', {'class': 'header'})
|
||||||
if desc_tag:
|
if desc_tag:
|
||||||
descriptions.append(desc_tag.string)
|
descriptions.append(self.tag_to_string(desc_tag))
|
||||||
if not url:
|
if not url:
|
||||||
url = self.fix_url(desc_tag.get('href', ''))
|
url = self.fix_url(desc_tag.get('href', ''))
|
||||||
self.add_article(title, url, r"\r\n".join(descriptions))
|
self.add_article(title, url, r"\r\n".join(descriptions))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user