View Single Post
Old 10-25-2022, 02:13 PM   #6
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,423
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can implement get_obfuscated_article() to get them manually, something like this

Code:
articles_are_obfuscated = True
def get_obfuscated_article(self, url):
    br = self.get_browser()
    try:
         br.open(url)
    except Exception as e:
         url = e.hdrs.get('location')
    html = br.open(url).read()
Then save the html to temporary file and return the path to the file.
kovidgoyal is offline   Reply With Quote