mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix for no articles returned
May need further cleaning but at least returns articles now. Fixes https://bugs.launchpad.net/calibre/+bug/1674042
This commit is contained in:
parent
a060fae673
commit
1572ca42a7
@ -70,19 +70,8 @@ class Politico(BasicNewsRecipe):
|
||||
del item['style']
|
||||
return soup
|
||||
|
||||
url_pat = re.compile(r'<a href="([^"]+print.*\.cfm[^"]+)"')
|
||||
|
||||
def postprocess_html(self, soup, first):
|
||||
|
||||
for tag in soup.findAll(name=['table', 'tr', 'td']):
|
||||
tag.name = 'div'
|
||||
return soup
|
||||
|
||||
def print_version(self, url):
|
||||
raw = self.index_to_soup(url, raw=True)
|
||||
try:
|
||||
url = self.url_pat.search(raw).group(1)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
url = None
|
||||
return url
|
||||
|
Loading…
x
Reference in New Issue
Block a user