Python使用Phantomjs截屏网页 Python使用Phantomjs截屏网页的方法

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

Python使用Phantomjs截屏网页 Python使用Phantomjs截屏网页的方法

Blackrosetian   2021-03-31 我要评论

实例如下所示:

#!/usr/bin/python
# -*- coding:utf8 -*-

from selenium import webdriver
import os
driver1 = webdriver.PhantomJS(executable_path='/usr/local/bin/phantomjs')
driver1.get("http://www.csdn.net")
data = driver1.title
driver1.save_screenshot('csdn.png')
print data
print os.getcwd()

以上这篇Python使用Phantomjs截屏网页的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。

猜您喜欢

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们