View Single Post
Old 10-20-2018, 09:36 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,439
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The server you are contacting is failing, probably ecause it needs some cookies set or something similar. Add this to your recipe to check:

Code:
    def preprocess_raw_html(self, html, url):
        with open('/t/raw.html', 'wb') as f:
            f.write(html.encode('utf-8'))
        return html
change the '/t/raw.html' above to some path on your computer and open the resulting raw.html after the download to see what actual html the servr is sending.
kovidgoyal is offline   Reply With Quote