赞
踩
import os
import time
import datetime
import codecs
from lxml import etree
from selenium import webdriver
import csv
'''遇到python不懂的问题,可以加Python学习交流群:1004391443一起学习交流,群文件还有零基础入门的学习资料'''
#控制编码,全英文网页,用不着
# import sys
# reload(sys)
# sys.setdefaultencoding('utf-8')
# # date格式转为string格式
today = datetime.date.today()
today_string = today.strftime('%Y-%m-%d')
#通过浏览器得到网页页面--反反爬虫
def html_getter(site,file_name):
driver = webdriver.Firefox()
# chromedriver = r'C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe'
# os.environ['webdriver.chrome.driver'] = chromedriver
# driver = webdriver.Chrome(chromedriver)
driver.get(site)
driver.maximize_
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。