资源简介
python + selenium 驱动谷歌浏览器 实现模拟人工爬取车次数据,特别注意 谷歌版本和驱动器版本。
代码片段和文件信息
# -*- coding: utf-8 -*-
from selenium import webdriver
import re
import openpyxl
import time
def closeLogin():
try:
browser.find_element_by_xpath(“//div[@class=‘modal-login-tit‘]//a“).click()
except:
pass
if __name__ == ‘__main__‘:
station_list1 = [‘北京北‘ ‘广州南‘ ‘北京‘ ‘北京南‘ ‘北京西‘ ‘北京东‘ ‘重庆北‘ ‘重庆‘ ‘重庆南‘ ‘重庆西‘ ‘广州东‘ ‘上海‘ ‘上海南‘ ‘上海虹桥‘ ‘上海西‘ ‘天津北‘ ‘天津‘ ‘天津南‘ ‘天津西‘ ‘香港西九龙‘ ‘长春‘ ‘长春南‘ ‘长春西‘ ‘成都东‘ ‘成都南‘ ‘成都‘ ‘长沙‘ ‘长沙南‘ ‘大明湖‘ ‘福州‘ ‘福州南‘ ‘贵阳‘ ‘广州‘ ‘广州西‘ ‘哈尔滨‘ ‘哈尔滨东‘ ‘哈尔滨西‘ ‘合肥‘ ‘合肥西‘ ‘呼和浩特东‘ ‘呼和浩特‘ ‘海口东‘ ‘海口‘ ‘杭州东‘ ‘杭州‘ ‘杭州南‘ ‘济南‘ ‘济南‘ ‘济南西‘ ‘济南西‘ ‘昆明‘ ‘昆明西‘ ‘拉萨‘ ‘兰州东‘ ‘兰州‘ ‘兰州西‘ ‘南昌‘ ‘南京‘ ‘南京南‘ ‘南宁‘ ‘石家庄北‘ ‘石家庄‘ ‘沈阳‘ ‘沈阳北‘ ‘沈阳东‘ ‘沈阳南‘ ‘太原北‘ ‘太原东‘ ‘太原‘ ‘武汉‘ ‘王家营西‘ ‘乌鲁木齐‘ ‘西安北‘ ‘西安‘ ‘西安南‘ ‘西宁‘ ‘银川‘ ‘郑州‘ ‘阿尔山‘ ‘安康‘ ‘阿克苏‘ ‘阿里河‘ ‘阿拉山口‘ ‘安平‘ ‘安庆‘ ‘安顺‘ ‘鞍山‘ ‘安阳‘ ‘北安‘ ‘蚌埠‘ ‘白城‘ ‘北海‘ ‘白河‘ ‘白涧‘ ‘宝鸡‘ ‘滨江‘ ‘博克图‘ ‘百色‘ ‘白山市‘ ‘北台‘ ‘包头东‘ ‘包头‘ ‘北屯市‘ ‘本溪‘ ‘白云鄂博‘ ‘白银西‘ ‘亳州‘ ‘赤壁‘ ‘常德‘ ‘承德‘ ‘长甸‘ ‘赤峰南‘ ‘茶陵‘ ‘苍南‘ ‘昌平‘ ‘崇仁‘ ‘昌图‘ ‘长汀镇‘ ‘曹县‘ ‘楚雄南‘ ‘陈相屯‘ ‘长治北‘ ‘池州‘ ‘长征‘ ‘常州‘ ‘郴州‘ ‘长治‘ ‘沧州‘ ‘崇左‘ ‘大安北‘ ‘大成‘ ‘丹东‘ ‘东方红‘ ‘东莞东‘ ‘大虎山‘ ‘敦化‘ ‘敦煌‘ ‘德惠‘ ‘东京城‘ ‘大涧‘ ‘都江堰‘ ‘大连北‘ ‘大理‘ ‘大连‘ ‘定南‘ ‘大庆‘ ‘东胜‘ ‘大石桥‘ ‘大同‘ ‘东营‘ ‘大杨树‘ ‘都匀‘ ‘邓州‘ ‘达州‘ ‘德州‘ ‘额济纳‘ ‘二连‘ ‘恩施‘ ‘福鼎‘ ‘凤凰机场‘ ‘风陵渡‘ ‘涪陵‘ ‘富拉尔基‘ ‘抚顺北‘ ‘佛山‘ ‘阜新南‘ ‘阜阳‘ ‘格尔木‘ ‘广汉‘ ‘古交‘ ‘桂林北‘ ‘古莲‘ ‘桂林‘ ‘固始‘ ‘广水‘ ‘干塘‘ ‘广元‘ ‘广州北‘ ‘赣州‘ ‘公主岭‘ ‘公主岭南‘ ‘淮安‘ ‘淮北‘ ‘鹤北‘ ‘淮滨‘ ‘河边‘ ‘潢川‘ ‘韩城‘ ‘邯郸‘ ‘横道河子‘ ‘鹤岗‘ ‘皇姑屯‘ ‘红果‘ ‘黑河‘ ‘怀化‘ ‘汉口‘ ‘葫芦岛‘ ‘海拉尔‘ ‘霍林郭勒‘ ‘海伦‘ ‘侯马‘ ‘哈密‘ ‘淮南‘ ‘桦南‘ ‘海宁西‘ ‘鹤庆‘ ‘怀柔北‘ ‘怀柔‘ ‘黄石东‘ ‘华山‘ ‘黄山‘ ‘黄石‘ ‘衡水‘ ‘衡阳‘ ‘菏泽‘ ‘贺州‘ ‘汉中‘ ‘惠州‘ ‘吉安‘ ‘集安‘ ‘江边村‘ ‘晋城‘ ‘金城江‘ ‘景德镇‘ ‘嘉峰‘ ‘加格达奇‘ ‘井冈山‘ ‘蛟河‘ ‘金华南‘ ‘金华‘ ‘九江‘ ‘吉林‘ ‘荆门‘ ‘佳木斯‘ ‘济宁‘ ‘集宁南‘ ‘酒泉‘ ‘江山‘ ‘吉首‘ ‘九台‘ ‘镜铁山‘ ‘鸡西‘ ‘绩溪县‘ ‘嘉峪关‘ ‘江油‘ ‘蓟州北‘ ‘金州‘ ‘锦州‘ ‘库尔勒‘ ‘开封‘ ‘岢岚‘ ‘凯里‘ ‘喀什‘ ‘昆山南‘ ‘奎屯‘ ‘开原‘ ‘六安‘ ‘灵宝‘ ‘芦潮港‘ ‘利川‘ ‘隆昌‘ ‘陆川‘ ‘临川‘ ‘潞城‘ ‘鹿道‘ ‘娄底‘ ‘临汾‘ ‘良各庄‘ ‘临河‘ ‘漯河‘ ‘绿化‘ ‘隆化‘ ‘丽江‘ ‘临江‘ ‘龙井‘ ‘吕梁‘ ‘醴陵‘ ‘柳林南‘ ‘滦平‘ ‘六盘水‘ ‘灵丘‘ ‘旅顺‘ ‘兰溪‘ ‘陇西‘ ‘澧县‘ ‘临西‘ ‘龙岩‘ ‘耒阳‘ ‘洛阳‘ ‘连云港东‘ ‘洛阳东‘ ‘临沂‘ ‘洛阳龙门‘ ‘柳园‘ ‘凌源‘ ‘辽源‘ ‘立志‘ ‘柳州‘ ‘辽中‘ ‘麻城‘ ‘免渡河‘ ‘牡丹江‘ ‘莫尔道嘎‘ ‘明光‘ ‘满归‘ ‘漠河‘ ‘茂名‘ ‘茂名西‘ ‘密山‘ ‘马三家‘ ‘麻尾‘ ‘绵阳‘ ‘梅州‘ ‘满洲里‘ ‘宁波东‘ ‘宁波‘ ‘南岔‘ ‘南充‘ ‘南丹‘ ‘南大庙‘ ‘南芬‘ ‘讷河‘ ‘嫩江‘ ‘内江‘ ‘南通‘ ‘南阳‘ ‘碾子山‘ ‘平顶山‘ ‘盘锦‘ ‘平凉‘ ‘平凉南‘ ‘平泉‘ ‘坪石‘ ‘萍乡‘ ‘凭祥‘ ‘郫县西‘ ‘攀枝花‘ ‘蕲春‘ ‘青城山‘ ‘青岛‘ ‘清河城‘ ‘曲靖‘ ‘黔江‘ ‘前进镇‘ ‘齐齐哈尔‘ ‘七台河‘ ‘沁县‘ ‘泉州东‘ ‘泉州‘ ‘衢州‘ ‘融安‘ ‘汝箕沟‘ ‘瑞金‘ ‘日照‘ ‘双城堡‘ ‘绥芬河‘ ‘韶关东‘ ‘山海关‘ ‘绥化‘ ‘三间房‘ ‘苏家屯‘ ‘舒兰‘ ‘神木南‘ ‘三门峡‘ ‘商南‘ ‘遂宁‘ ‘四平‘ ‘商丘‘ ‘上饶‘ ‘韶山‘ ‘宿松‘ ‘汕头‘ ‘邵武‘ ‘涉县‘ ‘邵阳‘ ‘三亚‘ ‘十堰‘ ‘三元区‘ ‘双鸭山‘ ‘松原‘ ‘苏州‘ ‘深圳‘ ‘宿州‘ ‘随州‘ ‘朔州‘ ‘深圳西‘ ‘塘豹‘ ‘塔尔气‘ ‘潼关‘ ‘塘沽‘ ‘塔河‘ ‘通化‘ ‘泰来‘ ‘吐鲁番‘ ‘通辽‘ ‘铁岭‘ ‘陶赖昭‘ ‘图们‘ ‘铜仁‘ ‘唐山北‘ ‘田师府‘ ‘泰山‘ ‘唐山‘ ‘天水‘ ‘通远堡‘ ‘太阳升‘ ‘泰州‘ ‘桐梓‘ ‘通州西‘ ‘五常‘ ‘武昌‘ ‘瓦房店‘ ‘威海‘ ‘芜湖‘ ‘乌海西‘ ‘吴家屯‘ ‘乌鲁木齐南‘ ‘武隆‘ ‘乌兰浩特‘ ‘渭南‘ ‘威
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2020-03-05 13:17 .idea\
目录 0 2020-03-03 18:02 .idea\inspectionProfiles\
文件 174 2020-03-03 18:02 .idea\inspectionProfiles\profiles_settings.xm
文件 203 2020-03-03 18:02 .idea\misc.xm
文件 283 2020-03-03 18:02 .idea\modules.xm
文件 11172 2020-03-05 13:17 .idea\workspace.xm
文件 361 2020-03-03 18:02 .idea\车次数据.iml
目录 0 2020-03-04 14:12 __pycache__\
文件 165329 2020-03-04 14:12 __pycache__\train.cpython-38.pyc
目录 0 2020-03-03 19:13 common\
文件 8073216 2019-12-17 10:14 common\chromedriver.exe
文件 73833 2020-03-05 12:06 train.py
目录 0 2020-03-03 18:01 venv\
目录 0 2020-03-05 17:23 venv\Include\
目录 0 2020-03-03 18:01 venv\Lib\
目录 0 2020-03-04 16:01 venv\Lib\site-packages\
目录 0 2020-03-03 20:50 venv\Lib\site-packages\__pycache__\
文件 12307 2020-03-03 20:50 venv\Lib\site-packages\__pycache__\jdcal.cpython-38.pyc
目录 0 2020-03-04 16:01 venv\Lib\site-packages\beautifulsoup4-4.8.2.dist-info\
文件 4 2020-03-04 16:01 venv\Lib\site-packages\beautifulsoup4-4.8.2.dist-info\INSTALLER
文件 4105 2020-03-04 16:01 venv\Lib\site-packages\beautifulsoup4-4.8.2.dist-info\me
文件 2734 2020-03-04 16:01 venv\Lib\site-packages\beautifulsoup4-4.8.2.dist-info\RECORD
文件 92 2020-03-04 16:01 venv\Lib\site-packages\beautifulsoup4-4.8.2.dist-info\WHEEL
文件 4 2020-03-04 16:01 venv\Lib\site-packages\beautifulsoup4-4.8.2.dist-info\top_level.txt
目录 0 2020-03-04 16:01 venv\Lib\site-packages\bs4\
文件 29063 2020-03-04 16:01 venv\Lib\site-packages\bs4\__init__.py
目录 0 2020-03-04 16:01 venv\Lib\site-packages\bs4\__pycache__\
文件 20544 2020-03-04 16:01 venv\Lib\site-packages\bs4\__pycache__\__init__.cpython-38.pyc
文件 21599 2020-03-04 16:01 venv\Lib\site-packages\bs4\__pycache__\dammit.cpython-38.pyc
文件 8442 2020-03-04 16:01 venv\Lib\site-packages\bs4\__pycache__\diagnose.cpython-38.pyc
文件 60768 2020-03-04 16:01 venv\Lib\site-packages\bs4\__pycache__\element.cpython-38.pyc
............此处省略1378个文件信息
相关资源
- python实现SGBM图像匹配算法
- python实现灰度直方图均衡化
- scrapy_qunar_one
- Python学习全系列教程永久可用
- python简明教程.chm
- 抽奖大转盘python的图形化界面
- 双边滤波器实验报告及代码python
- python +MYSQL+HTML实现21蛋糕网上商城
- Python-直播答题助手自动检测出题搜索
- OpenCV入门教程+OpenCV官方教程中文版
- Python 串口工具源码+.exe文件
- Python开发的全栈股票系统.zip
- Python操作Excel表格并将其中部分数据写
- python书籍 PDF
- 利用python绘制散点图
- python+labview+No1.vi
- 老男孩python项目实战
- python源码制作whl文件.rar
- python3.5可用的scipy
- PYTHON3 经典50案例.pptx
- 计算机科学导论-python.pdf
- python模拟鼠标点击屏幕
- windows鼠标自动点击py脚本
- 鱼c小甲鱼零基础学python全套课后题和
- Python 练习题100道
- Practical Programming 2nd Edition
- wxPython Application Development Cookbook
- python 3.6
- Python 3.5.2 中文文档 互联网唯一CHM版本
- python3.5.2.chm官方文档
评论
共有 条评论