在这个例子中,我知道使用request或类似的python模块会更容易一些。
但是我需要使用ghost.py模块来完成
此代码示例不起作用:
from ghost import Ghost
ghost = Ghost()
with ghost.start() as session:
page, extra_resources = session.open('http://www.7-zip.org/a/7z1506-x64.exe')
with open('7z1506-x64.exe', 'wb') as file:
file.write(session.http_resources)发布于 2015-10-16 16:29:53
我在这里创建了一些代码片段:https://github.com/jeanphix/Ghost.py/issues/273
但这不是最终的解决方案。
发布于 2017-02-18 23:18:05
对于Ghost.py (0.2.3)
...
with open('7z1506-x64.exe', 'wb') as file:
file.write(eval(extra_resources[0].content))https://stackoverflow.com/questions/32363549
复制相似问题