Quote:
Originally Posted by kovidgoyal
grep jsbrowser recipes/*
to find the builtin recipe.
|
thanks for reply, kovid
i find a recipe, but it only has a small piece of code

,may be i was too stupid?
do you have further details?
Code:
js_fetcher = '''
import calibre.web.jsbrowser.browser as jsbrowser
def grab(url):
browser = jsbrowser.Browser()
#10 second timeout
browser.visit(url, 10)
browser.run_for_a_time(10)
html = browser.html
browser.close()
return html
'''