0

我正在使用 ghost.py 截屏网页。但是该脚本没有捕获页面上的任何图像。我设置了 download_images=True - 但这似乎不起作用。

我的代码:

from ghost import Ghost

ghost = Ghost(wait_timeout=4, download_images = True) #download_images not working

ghost.open('http://sex-offender.vsp.virginia.gov/sor/policy.html')

ghost.capture_to('page.png')

这就是我得到的 - 没有图像

4

2 回答 2

1

我无法重现您的问题,它对我来说没有问题。我正在使用 Python 3。

于 2014-03-28T17:41:12.577 回答
0

为后代:

仅在使用 python 2.7 时才会出现此问题。如果你使用 python 3.3 没问题。

于 2014-03-31T19:24:06.967 回答