View Single Post
Old 08-04-2017, 11:00 AM   #3
hiperlink
Enthusiast
hiperlink began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Dec 2010
Device: Kindle 3 Wifi only
Thanks for the quick reply Kovid!

Just modified my recipe to have:

Code:
    def postprocess_html(self, soup, first):
        html_title     = soup.find('title').string
        if not html_title:
            self.log("BINGO: ", html_title)
            self.log(soup)
And the relevant output is:
Code:
BINGO:  None
<html><head><title>Csakis a közjó | ÉLET ÉS IRODALOM</title><style type="text/css" title="override_css">
            .article_date {
                color: gray; font-family: monospace;
            }
### SNIPPED...
Traceback (most recent call last):
  File "site-packages/calibre/web/fetch/simple.py", line 553, in process_links
  File "site-packages/calibre/web/feeds/news.py", line 992, in _postprocess_html
  File "<string>", line 51, in postprocess_html
AttributeError: 'NoneType' object has no attribute 'replace'
So the title is there...
hiperlink is offline   Reply With Quote