网络编程
位置:首页>> 网络编程>> Python编程>> Python使用Phantomjs截屏网页的方法

Python使用Phantomjs截屏网页的方法

作者:Blackrosetian  发布时间:2022-06-17 15:47:14 

标签:Phantomjs,截屏,网页,Python

实例如下所示:


#!/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()

来源:https://blog.csdn.net/Blackrosetian/article/details/75126904

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com