--javascript-delay,用于使用imgkit和Python进行屏幕截图

时间:2018-09-28 14:21:59

标签: python wkhtmltopdf imgkit

使用Python,imgkit和wkhtmltopdf(2.0)库,我试图对整个页面进行截图。经过一些准备后,我将调用方法make_screenshot:

def make_screenshot(url):
   options = {
    'format': 'png',
    'javascript-delay': '2000',
}

return imgkit.from_url(url, False, options=options)

但是当它运行时,我得到了这样的错误:

Loading page (1/2)
Rendering (2/2)                                                    
Warning: Received createRequest signal on a disposed ResourceObject's NetworkAccessManager. This might be an indication of an iframe taking too long to load.
Done  

创建的屏幕快照显示页面未完全加载。如何解决?

0 个答案:

没有答案