3

使用 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  

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

4

0 回答 0