使用phantomjs和python执行重定向
您好,如果phantomjs和python3出现这种情况,我想跟踪重定向,但我无法让它工作,谷歌也没有帮助我 代码:使用phantomjs和python执行重定向,python,python-3.x,redirect,phantomjs,Python,Python 3.x,Redirect,Phantomjs,您好,如果phantomjs和python3出现这种情况,我想跟踪重定向,但我无法让它工作,谷歌也没有帮助我 代码: from selenium import webdriver with open("test", "r") as t: br = webdriver.PhantomJS() for line in t.readlines(): br.get('http://{}'.format(line)) br.save_screenshot('./screens/{}.p
from selenium import webdriver
with open("test", "r") as t:
br = webdriver.PhantomJS()
for line in t.readlines():
br.get('http://{}'.format(line))
br.save_screenshot('./screens/{}.png'.format(line))
br.quit()
信息:“test”是加载URL的文件
我不能截取子目录的屏幕截图,例如:google.com/help,但我也想要它你想请求的网站是什么?这并不重要,只是重定向