mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Associated Press
This commit is contained in:
parent
8cc5499d91
commit
790b8273a7
@ -35,6 +35,8 @@ class AssociatedPress(BasicNewsRecipe):
|
||||
|
||||
articles = []
|
||||
for x in soup.findAll('p', attrs={'class': ['ap-newsbriefitem-p', 'ap-topheadlineitem-p']}):
|
||||
if not x.contents:
|
||||
x = x.parent
|
||||
a = x.find('a', href=True)
|
||||
title = self.tag_to_string(a)
|
||||
url = "http://hosted.ap.org" + a['href']
|
||||
|
Loading…
x
Reference in New Issue
Block a user