mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
f098784f55
commit
6cd7aeb64f
@ -82,6 +82,14 @@ class ChicagoTribune(BasicNewsRecipe):
|
|||||||
url = url.partition('?')[0]
|
url = url.partition('?')[0]
|
||||||
return url
|
return url
|
||||||
|
|
||||||
|
def skip_ad_pages(self, soup):
|
||||||
|
text = soup.find(text='click here to continue to article')
|
||||||
|
if text:
|
||||||
|
a = text.parent
|
||||||
|
url = a.get('href')
|
||||||
|
if url:
|
||||||
|
return self.index_to_soup(url, raw=True)
|
||||||
|
|
||||||
def postprocess_html(self, soup, first_fetch):
|
def postprocess_html(self, soup, first_fetch):
|
||||||
# Remove the navigation bar. It was kept until now to be able to follow
|
# Remove the navigation bar. It was kept until now to be able to follow
|
||||||
# the links to further pages. But now we don't need them anymore.
|
# the links to further pages. But now we don't need them anymore.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user