mirror of https://github.com/testerSunshine/12306
parent
94571217cc
commit
1dee0ad033
35
README.md
35
README.md
|
@ -23,14 +23,14 @@
|
|||
- 本软件只供学习交流使用,务作为商业用途,作者qq 931128603
|
||||
|
||||
- 2017.5.13跟新
|
||||
1. 增加登陆错误判断(密码错误&ip校验)
|
||||
2. 修改queryOrderWaitTime,校验orderId字段bug,校验msg字段bug,校验messagesbug
|
||||
3. 修改checkQueueOrder 校验 data 字段的列表推导式bug
|
||||
4. 增加代理ip方法,目前已可以过滤有用ip
|
||||
- 增加登陆错误判断(密码错误&ip校验)
|
||||
- 修改queryOrderWaitTime,校验orderId字段bug,校验msg字段bug,校验messagesbug
|
||||
- 修改checkQueueOrder 校验 data 字段的列表推导式bug
|
||||
- 增加代理ip方法,目前已可以过滤有用ip
|
||||
|
||||
|
||||
- 2018.1.7 号更新
|
||||
1. 增加自动配置
|
||||
- 增加自动配置
|
||||
```
|
||||
#station_date:出发日期,格式ex:2018-01-06
|
||||
#from_station: 始发站
|
||||
|
@ -41,11 +41,22 @@
|
|||
#ticke_peoples: 乘客
|
||||
#damatu:打码图账号,用于自动登录
|
||||
```
|
||||
2. 优化订票流程
|
||||
3. 支持自动刷票,自动订票
|
||||
- 优化订票流程
|
||||
- 支持自动刷票,自动订票
|
||||
|
||||
- 2018.1.8 号更新
|
||||
1. 增加小黑屋功能
|
||||
2. 修复bug若干
|
||||
3. 增加多账号同时订票功能
|
||||
4. 增加按照选定车次筛选购买车次
|
||||
- 2018.1.8 更新
|
||||
- 增加小黑屋功能
|
||||
- 修复bug若干
|
||||
- 增加多账号同时订票功能
|
||||
- 增加按照选定车次筛选购买车次
|
||||
|
||||
- 2018.1.9 更新
|
||||
|
||||
- 增加手动打码,只是登录接口,完全不用担心提交票的效率问题
|
||||
```
|
||||
思路
|
||||
1.调用PIL显示图片
|
||||
2.图片位置说明,验证码图片中每个图片代表一个下标,依次类推,1,2,3,4,5,6,7,8
|
||||
3.控制台输入对应下标,按照英文逗号分开,即可手动完成打码,
|
||||
```
|
||||
- 修改无座和硬座的座位号提交是个字符串的问题
|
||||
|
|
|
@ -19,7 +19,7 @@ class proxy:
|
|||
header = {}
|
||||
header['User-Agent'] = User_Agent
|
||||
|
||||
for i in range(1, 10):
|
||||
for i in range(1, 5):
|
||||
url = 'http://www.xicidaili.com/nn/'+str(i)
|
||||
req = urllib2.Request(url, headers=header)
|
||||
res = urllib2.urlopen(req).read()
|
||||
|
@ -50,7 +50,7 @@ class proxy:
|
|||
f.write(write_proxy)
|
||||
proxy_num += 1
|
||||
except Exception, e:
|
||||
print ("代理链接超时,去除此IP:"+ proxy)
|
||||
print ("代理链接超时,去除此IP:{0}".format(proxy))
|
||||
print e
|
||||
continue
|
||||
print("总共可使用ip量为{}个".format(proxy_num))
|
||||
|
@ -70,7 +70,7 @@ class proxy:
|
|||
def main(self):
|
||||
self.get_proxy()
|
||||
self.filter_proxy()
|
||||
self.get_filter_proxy()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
a = proxy()
|
||||
|
|
|
@ -1,900 +1 @@
|
|||
116.117.184.215:8080
|
||||
115.220.5.103:808
|
||||
222.95.20.76:808
|
||||
222.94.147.0:808
|
||||
183.153.40.131:808
|
||||
180.110.4.172:808
|
||||
115.203.84.49:808
|
||||
114.221.238.150:808
|
||||
120.83.103.14:808
|
||||
220.166.96.90:82
|
||||
116.226.90.12:808
|
||||
139.224.237.33:8888
|
||||
113.120.233.217:8118
|
||||
222.220.48.54:8998
|
||||
58.209.151.126:808
|
||||
119.4.134.124:808
|
||||
117.91.138.93:808
|
||||
175.155.25.9:808
|
||||
171.13.85.167:37610
|
||||
42.48.40.115:808
|
||||
180.76.154.5:8888
|
||||
49.86.62.115:808
|
||||
113.69.165.195:808
|
||||
117.91.138.201:808
|
||||
42.48.40.115:808
|
||||
119.165.249.13:8118
|
||||
219.139.190.188:808
|
||||
221.229.47.64:808
|
||||
175.155.231.208:808
|
||||
117.91.138.31:808
|
||||
218.86.128.21:8118
|
||||
116.255.153.137:8082
|
||||
220.160.10.233:808
|
||||
221.229.44.159:808
|
||||
221.229.46.40:808
|
||||
175.155.152.186:808
|
||||
202.108.2.42:80
|
||||
110.73.13.234:8123
|
||||
119.5.0.58:808
|
||||
222.134.171.222:808
|
||||
222.95.22.20:808
|
||||
115.213.202.253:808
|
||||
113.234.167.130:8118
|
||||
218.58.226.140:808
|
||||
119.5.1.42:808
|
||||
115.213.228.232:808
|
||||
183.153.5.159:808
|
||||
175.155.24.52:808
|
||||
175.155.244.212:808
|
||||
115.215.70.167:808
|
||||
222.94.149.15:808
|
||||
180.110.5.143:808
|
||||
113.69.63.159:808
|
||||
115.213.176.237:808
|
||||
117.43.0.105:808
|
||||
122.245.71.59:808
|
||||
119.5.217.143:808
|
||||
180.118.243.175:808
|
||||
113.57.48.234:8118
|
||||
113.69.37.179:808
|
||||
180.119.65.82:808
|
||||
183.153.17.87:808
|
||||
122.241.72.203:808
|
||||
119.5.1.57:808
|
||||
49.86.62.175:808
|
||||
122.245.65.48:808
|
||||
111.183.212.15:8118
|
||||
222.95.23.48:808
|
||||
120.83.97.110:808
|
||||
119.5.1.22:808
|
||||
110.153.16.148:8998
|
||||
175.155.24.48:808
|
||||
182.42.38.85:808
|
||||
110.83.46.150:808
|
||||
115.220.7.76:808
|
||||
175.155.245.84:808
|
||||
180.110.132.112:808
|
||||
27.159.125.23:8118
|
||||
121.237.143.77:808
|
||||
111.206.163.235:80
|
||||
121.61.107.94:808
|
||||
171.38.129.207:8123
|
||||
175.155.25.23:808
|
||||
119.7.78.55:808
|
||||
222.85.39.94:808
|
||||
119.5.169.61:808
|
||||
175.155.247.9:808
|
||||
119.5.0.38:808
|
||||
119.5.0.44:808
|
||||
175.155.25.32:808
|
||||
119.5.0.4:808
|
||||
123.169.91.39:808
|
||||
115.209.29.188:808
|
||||
171.38.161.4:8123
|
||||
218.64.92.250:808
|
||||
114.239.145.68:808
|
||||
14.109.102.12:8998
|
||||
119.7.77.130:808
|
||||
175.155.240.134:808
|
||||
115.220.1.20:808
|
||||
119.7.77.130:808
|
||||
175.155.240.134:808
|
||||
115.220.1.20:808
|
||||
113.58.234.56:808
|
||||
115.202.166.37:808
|
||||
114.239.145.214:808
|
||||
122.245.71.170:808
|
||||
60.178.84.54:808
|
||||
115.220.148.242:808
|
||||
221.229.45.134:808
|
||||
27.159.124.121:8118
|
||||
117.91.138.191:808
|
||||
119.5.0.20:808
|
||||
183.153.52.164:808
|
||||
218.64.154.164:808
|
||||
113.69.38.41:808
|
||||
115.207.4.184:808
|
||||
36.249.27.218:808
|
||||
114.239.252.29:808
|
||||
222.95.23.12:808
|
||||
60.167.20.148:808
|
||||
114.230.121.154:808
|
||||
119.0.170.7:8998
|
||||
140.224.76.58:808
|
||||
110.73.5.126:8123
|
||||
125.106.93.210:808
|
||||
115.203.87.213:808
|
||||
114.230.232.183:808
|
||||
183.150.138.103:808
|
||||
119.5.1.62:808
|
||||
60.184.110.48:808
|
||||
222.94.150.242:808
|
||||
115.202.182.40:808
|
||||
115.202.190.170:808
|
||||
175.155.246.135:808
|
||||
115.220.145.129:808
|
||||
1.192.247.78:8118
|
||||
119.7.75.246:808
|
||||
119.130.34.36:8118
|
||||
175.155.227.13:808
|
||||
221.229.47.109:808
|
||||
123.169.85.64:808
|
||||
59.62.119.220:808
|
||||
175.155.24.84:808
|
||||
125.118.70.222:808
|
||||
180.118.240.195:808
|
||||
123.55.92.49:808
|
||||
175.155.25.28:808
|
||||
113.69.62.201:808
|
||||
175.155.25.3:808
|
||||
115.202.183.74:808
|
||||
122.245.65.68:808
|
||||
119.5.0.100:808
|
||||
171.38.24.118:8123
|
||||
123.170.255.62:808
|
||||
222.94.150.0:808
|
||||
222.95.18.16:808
|
||||
218.73.143.244:35134
|
||||
115.220.145.51:808
|
||||
110.73.196.43:8123
|
||||
123.55.188.212:808
|
||||
220.160.10.198:808
|
||||
122.10.190.66:808
|
||||
115.215.68.77:808
|
||||
110.73.8.183:8123
|
||||
113.70.147.24:808
|
||||
115.213.204.95:808
|
||||
113.70.149.90:808
|
||||
221.229.44.70:808
|
||||
221.229.45.209:808
|
||||
115.202.181.181:808
|
||||
114.239.145.94:808
|
||||
119.5.0.111:808
|
||||
125.112.175.67:27141
|
||||
121.226.187.32:808
|
||||
218.64.93.41:808
|
||||
60.167.135.44:808
|
||||
119.4.135.231:808
|
||||
112.84.59.176:808
|
||||
60.178.84.179:808
|
||||
119.5.0.155:808
|
||||
171.13.36.125:808
|
||||
121.40.108.76:80
|
||||
113.122.139.172:808
|
||||
113.122.3.142:808
|
||||
113.122.153.239:808
|
||||
182.42.41.149:808
|
||||
119.7.73.5:808
|
||||
221.229.47.69:808
|
||||
116.28.121.144:808
|
||||
175.155.137.168:808
|
||||
175.170.188.214:8118
|
||||
121.205.72.77:42563
|
||||
182.35.210.97:808
|
||||
113.121.250.192:808
|
||||
115.215.70.250:808
|
||||
175.155.241.131:808
|
||||
115.215.69.86:808
|
||||
1.58.69.67:8118
|
||||
221.229.45.81:808
|
||||
113.69.253.78:808
|
||||
222.95.19.49:808
|
||||
171.38.187.113:8123
|
||||
116.196.3.165:29669
|
||||
115.202.183.22:808
|
||||
125.106.129.253:808
|
||||
125.106.130.159:808
|
||||
115.202.177.111:808
|
||||
171.13.36.250:808
|
||||
221.229.44.160:808
|
||||
115.203.74.2:808
|
||||
59.62.124.190:808
|
||||
175.155.24.99:808
|
||||
115.207.6.171:808
|
||||
125.122.61.235:808
|
||||
117.43.41.141:808
|
||||
114.238.116.89:808
|
||||
183.128.127.188:808
|
||||
120.83.122.62:808
|
||||
125.118.66.163:808
|
||||
115.215.71.162:808
|
||||
117.84.113.115:808
|
||||
115.220.144.107:808
|
||||
175.155.142.73:808
|
||||
115.202.184.98:808
|
||||
183.153.24.0:808
|
||||
115.220.149.238:808
|
||||
171.38.131.144:8123
|
||||
123.163.162.9:808
|
||||
113.121.169.32:808
|
||||
115.203.76.90:808
|
||||
222.33.192.238:8118
|
||||
175.167.63.82:808
|
||||
110.177.149.204:808
|
||||
114.239.2.179:808
|
||||
125.89.123.75:808
|
||||
123.169.90.198:808
|
||||
115.203.90.156:808
|
||||
183.153.15.141:808
|
||||
175.155.240.246:808
|
||||
171.13.37.193:808
|
||||
115.220.1.134:808
|
||||
175.155.241.114:808
|
||||
183.153.15.153:808
|
||||
115.215.70.142:808
|
||||
115.220.5.173:808
|
||||
183.153.2.37:808
|
||||
115.220.151.69:808
|
||||
115.213.255.89:808
|
||||
180.115.12.104:30427
|
||||
60.184.117.13:808
|
||||
175.155.245.182:808
|
||||
183.153.21.190:808
|
||||
113.123.127.193:808
|
||||
175.155.246.245:808
|
||||
112.85.11.241:808
|
||||
175.155.247.223:808
|
||||
113.69.254.227:808
|
||||
113.69.255.233:808
|
||||
117.43.0.48:808
|
||||
115.203.174.6:808
|
||||
180.110.19.130:808
|
||||
119.7.74.253:808
|
||||
113.121.42.15:808
|
||||
113.121.249.211:808
|
||||
171.13.36.147:808
|
||||
222.85.50.211:808
|
||||
125.118.68.17:808
|
||||
115.220.3.33:808
|
||||
27.184.53.113:8118
|
||||
114.239.2.67:808
|
||||
120.90.6.92:8080
|
||||
171.38.36.225:8123
|
||||
115.213.230.100:808
|
||||
171.38.94.214:8123
|
||||
222.134.169.96:808
|
||||
218.65.64.2:808
|
||||
171.38.185.205:8123
|
||||
115.213.229.36:808
|
||||
114.99.18.146:808
|
||||
116.28.109.213:808
|
||||
27.24.176.2:808
|
||||
121.61.111.98:808
|
||||
115.220.7.249:808
|
||||
183.153.9.82:808
|
||||
115.203.94.117:808
|
||||
115.203.88.124:808
|
||||
123.161.153.166:29353
|
||||
117.86.21.18:808
|
||||
119.5.0.29:808
|
||||
114.99.7.186:808
|
||||
114.99.20.20:808
|
||||
183.153.10.225:808
|
||||
114.99.0.202:808
|
||||
101.66.90.16:808
|
||||
123.179.130.203:80
|
||||
175.155.25.17:808
|
||||
182.90.92.78:80
|
||||
115.220.149.51:808
|
||||
122.228.179.178:80
|
||||
182.90.92.78:80
|
||||
115.220.149.51:808
|
||||
122.228.179.178:80
|
||||
115.212.82.156:808
|
||||
115.203.173.72:808
|
||||
175.155.245.153:808
|
||||
125.89.120.85:808
|
||||
121.61.110.226:808
|
||||
114.239.145.187:808
|
||||
49.65.151.37:808
|
||||
222.85.50.186:808
|
||||
221.229.45.93:808
|
||||
140.224.76.121:808
|
||||
60.167.132.147:808
|
||||
222.94.146.127:808
|
||||
125.89.122.21:808
|
||||
115.202.174.62:808
|
||||
114.239.146.55:808
|
||||
111.72.244.191:808
|
||||
175.155.24.10:808
|
||||
60.184.172.93:808
|
||||
175.155.25.37:808
|
||||
114.238.144.250:808
|
||||
110.73.7.0:8123
|
||||
183.153.15.242:808
|
||||
110.73.48.157:8123
|
||||
115.220.6.127:808
|
||||
221.229.46.158:808
|
||||
175.155.240.117:808
|
||||
221.229.46.25:808
|
||||
175.155.240.63:808
|
||||
111.72.229.119:808
|
||||
60.178.84.148:808
|
||||
221.229.46.164:808
|
||||
114.239.147.25:808
|
||||
115.220.144.69:808
|
||||
111.72.154.3:808
|
||||
115.203.89.133:808
|
||||
110.73.38.201:8123
|
||||
218.64.93.164:808
|
||||
175.155.25.19:808
|
||||
119.5.0.22:808
|
||||
122.241.73.32:808
|
||||
125.89.124.6:808
|
||||
115.220.7.119:808
|
||||
115.220.145.168:808
|
||||
221.229.18.104:808
|
||||
36.248.132.82:808
|
||||
115.209.31.156:808
|
||||
175.155.24.21:808
|
||||
36.99.207.163:808
|
||||
222.85.50.218:808
|
||||
183.128.125.143:808
|
||||
115.213.177.58:808
|
||||
123.169.39.80:808
|
||||
140.224.76.202:45153
|
||||
122.242.222.233:21357
|
||||
110.73.51.33:8123
|
||||
119.5.0.53:808
|
||||
203.93.0.115:80
|
||||
110.73.11.6:8123
|
||||
175.155.24.18:808
|
||||
125.118.67.165:808
|
||||
119.5.0.6:808
|
||||
115.202.161.52:808
|
||||
175.155.138.215:808
|
||||
171.38.180.17:8123
|
||||
125.106.250.244:808
|
||||
180.110.4.247:808
|
||||
221.229.46.105:808
|
||||
60.178.87.44:808
|
||||
175.155.25.34:808
|
||||
115.203.86.219:808
|
||||
119.120.59.123:808
|
||||
175.155.25.43:808
|
||||
115.210.77.25:24482
|
||||
49.86.62.145:808
|
||||
110.73.36.55:8123
|
||||
111.72.245.79:808
|
||||
218.64.93.42:808
|
||||
122.245.67.127:808
|
||||
123.55.184.140:808
|
||||
171.12.139.67:808
|
||||
125.89.122.244:808
|
||||
125.118.69.238:808
|
||||
115.220.147.58:808
|
||||
119.5.1.54:808
|
||||
171.38.171.117:8123
|
||||
218.64.93.114:808
|
||||
117.43.0.244:808
|
||||
171.38.176.142:8123
|
||||
171.38.37.230:8123
|
||||
114.239.145.229:808
|
||||
117.43.44.154:808
|
||||
115.220.6.116:808
|
||||
175.155.24.111:808
|
||||
171.38.166.73:8123
|
||||
59.62.113.217:808
|
||||
120.83.96.111:808
|
||||
171.38.212.44:8123
|
||||
113.121.241.13:808
|
||||
119.5.1.87:808
|
||||
222.95.22.115:808
|
||||
113.69.62.174:808
|
||||
112.194.216.46:808
|
||||
125.106.131.239:808
|
||||
121.204.102.157:808
|
||||
119.254.84.90:80
|
||||
221.229.47.61:808
|
||||
175.155.24.45:808
|
||||
115.220.150.224:808
|
||||
221.229.44.19:808
|
||||
106.14.226.108:80
|
||||
115.221.121.222:27015
|
||||
115.220.149.248:808
|
||||
110.244.132.223:80
|
||||
113.58.234.89:808
|
||||
171.39.102.144:8123
|
||||
221.229.44.137:808
|
||||
180.118.243.224:808
|
||||
123.55.178.237:808
|
||||
115.213.250.150:808
|
||||
182.42.40.195:808
|
||||
175.155.24.60:808
|
||||
113.121.22.216:808
|
||||
115.220.150.103:808
|
||||
59.62.86.51:808
|
||||
106.46.3.179:808
|
||||
115.203.87.150:808
|
||||
175.155.24.17:808
|
||||
119.5.1.125:808
|
||||
175.155.24.57:808
|
||||
119.5.1.78:808
|
||||
119.5.0.5:808
|
||||
117.91.138.48:808
|
||||
171.38.186.121:8123
|
||||
175.155.247.101:808
|
||||
218.64.93.134:808
|
||||
222.134.171.35:808
|
||||
123.169.90.15:808
|
||||
115.215.69.69:808
|
||||
115.215.69.87:808
|
||||
123.169.90.224:808
|
||||
220.160.10.89:808
|
||||
115.215.71.195:808
|
||||
115.220.1.137:808
|
||||
175.155.24.96:808
|
||||
60.184.173.177:808
|
||||
60.167.22.73:808
|
||||
182.126.92.166:8118
|
||||
122.193.14.110:80
|
||||
115.202.185.97:808
|
||||
123.55.176.25:808
|
||||
123.55.178.223:808
|
||||
115.213.200.182:808
|
||||
123.55.179.224:808
|
||||
121.206.22.218:808
|
||||
115.203.85.134:808
|
||||
175.155.241.99:808
|
||||
218.64.92.202:808
|
||||
175.155.241.108:808
|
||||
60.26.142.110:8118
|
||||
115.220.146.51:808
|
||||
115.220.3.250:808
|
||||
175.155.24.80:808
|
||||
36.99.207.229:808
|
||||
153.36.13.190:808
|
||||
115.215.71.34:808
|
||||
110.73.32.173:8123
|
||||
182.88.166.229:8123
|
||||
49.86.62.196:808
|
||||
60.167.132.224:808
|
||||
119.29.136.14:808
|
||||
171.38.76.78:8123
|
||||
60.167.22.203:808
|
||||
180.118.242.135:808
|
||||
119.7.77.227:808
|
||||
221.229.45.208:808
|
||||
49.81.219.162:808
|
||||
182.45.177.141:808
|
||||
153.36.51.100:808
|
||||
115.220.144.49:808
|
||||
175.155.246.131:808
|
||||
153.36.79.171:808
|
||||
221.229.45.163:808
|
||||
175.155.244.89:808
|
||||
115.213.237.69:808
|
||||
175.155.243.9:808
|
||||
115.220.146.74:808
|
||||
175.155.68.99:808
|
||||
115.203.76.43:808
|
||||
125.122.48.128:808
|
||||
175.155.242.181:808
|
||||
119.5.32.81:808
|
||||
36.249.24.67:808
|
||||
218.64.93.43:808
|
||||
119.5.0.82:808
|
||||
175.155.25.7:808
|
||||
117.43.0.86:808
|
||||
110.73.30.248:8123
|
||||
113.123.55.133:808
|
||||
115.203.75.193:808
|
||||
175.155.241.139:808
|
||||
115.192.73.24:808
|
||||
180.110.133.88:808
|
||||
59.62.120.187:808
|
||||
115.220.0.115:808
|
||||
115.213.233.223:808
|
||||
175.155.141.235:808
|
||||
119.5.221.79:808
|
||||
175.155.241.151:808
|
||||
115.215.70.73:808
|
||||
121.226.170.98:45471
|
||||
110.73.32.90:8123
|
||||
115.203.67.241:808
|
||||
61.178.238.122:63000
|
||||
115.202.190.132:808
|
||||
115.220.7.77:808
|
||||
59.62.99.47:808
|
||||
60.167.21.79:808
|
||||
117.43.1.200:808
|
||||
182.38.23.198:808
|
||||
115.220.145.87:808
|
||||
182.90.6.121:80
|
||||
119.0.193.155:8998
|
||||
115.220.5.39:808
|
||||
222.94.145.155:808
|
||||
60.167.22.28:808
|
||||
175.155.244.101:808
|
||||
114.238.23.155:808
|
||||
60.167.23.29:808
|
||||
115.220.4.243:808
|
||||
182.45.176.218:808
|
||||
115.220.150.27:808
|
||||
182.38.104.192:808
|
||||
119.5.0.124:808
|
||||
113.121.44.92:808
|
||||
175.155.138.221:808
|
||||
182.38.172.68:8118
|
||||
175.169.125.76:80
|
||||
183.153.10.230:808
|
||||
27.158.27.192:8118
|
||||
180.118.242.180:808
|
||||
222.95.17.14:808
|
||||
222.94.146.245:808
|
||||
112.194.43.254:808
|
||||
175.155.25.62:808
|
||||
110.189.222.159:808
|
||||
175.155.24.38:808
|
||||
106.120.78.129:80
|
||||
140.224.76.198:808
|
||||
115.220.147.151:808
|
||||
182.90.78.255:8123
|
||||
123.169.87.87:808
|
||||
117.91.138.120:808
|
||||
113.58.235.168:808
|
||||
59.62.86.132:808
|
||||
175.155.243.46:808
|
||||
119.5.0.2:808
|
||||
222.85.39.167:808
|
||||
175.155.25.12:808
|
||||
218.64.92.166:808
|
||||
106.90.88.31:8123
|
||||
113.69.38.170:808
|
||||
113.69.253.236:808
|
||||
119.5.0.47:808
|
||||
218.64.92.216:808
|
||||
125.106.128.17:808
|
||||
60.167.132.22:808
|
||||
171.38.243.179:8123
|
||||
171.38.78.75:8123
|
||||
171.38.5.21:8123
|
||||
60.184.172.44:808
|
||||
114.238.22.42:808
|
||||
115.202.179.70:808
|
||||
125.89.122.177:808
|
||||
121.61.108.42:808
|
||||
125.89.120.54:808
|
||||
36.99.207.250:808
|
||||
114.238.62.229:808
|
||||
175.155.25.25:808
|
||||
113.69.167.143:808
|
||||
175.155.25.44:808
|
||||
119.7.72.39:808
|
||||
122.245.64.151:808
|
||||
123.163.82.226:808
|
||||
116.20.97.13:808
|
||||
175.155.24.2:808
|
||||
125.89.122.149:808
|
||||
119.5.0.24:808
|
||||
119.5.221.30:808
|
||||
180.118.243.144:808
|
||||
180.110.4.198:808
|
||||
115.220.3.189:808
|
||||
119.5.0.54:808
|
||||
123.55.94.133:808
|
||||
183.153.22.174:808
|
||||
221.175.137.24:80
|
||||
221.229.47.251:808
|
||||
115.220.4.9:808
|
||||
222.94.146.81:808
|
||||
115.207.81.54:808
|
||||
180.118.240.118:808
|
||||
113.69.60.144:808
|
||||
115.203.88.223:808
|
||||
115.215.70.58:808
|
||||
36.249.30.120:808
|
||||
182.88.42.232:8123
|
||||
60.178.87.224:808
|
||||
120.83.101.230:808
|
||||
121.61.103.168:808
|
||||
36.249.28.185:808
|
||||
221.229.45.204:808
|
||||
115.220.1.108:808
|
||||
59.62.126.145:808
|
||||
182.44.247.65:808
|
||||
59.62.123.154:808
|
||||
119.7.75.46:808
|
||||
113.69.164.231:808
|
||||
101.205.14.230:808
|
||||
175.155.241.194:808
|
||||
120.76.79.24:80
|
||||
117.91.138.209:808
|
||||
115.202.173.234:808
|
||||
117.43.0.183:808
|
||||
113.69.255.7:808
|
||||
121.61.105.219:808
|
||||
175.155.246.215:808
|
||||
123.169.85.115:808
|
||||
175.155.242.83:808
|
||||
115.220.2.65:808
|
||||
113.76.195.214:808
|
||||
119.7.76.29:808
|
||||
218.64.93.219:808
|
||||
125.106.248.80:808
|
||||
36.249.25.117:808
|
||||
175.155.25.26:808
|
||||
171.13.36.109:49546
|
||||
121.206.32.21:808
|
||||
222.95.20.13:808
|
||||
115.215.69.140:808
|
||||
119.5.217.189:808
|
||||
125.106.131.245:808
|
||||
61.188.24.97:808
|
||||
218.64.93.3:808
|
||||
113.69.253.223:808
|
||||
175.155.242.206:808
|
||||
222.95.20.25:808
|
||||
60.23.46.245:8118
|
||||
183.153.27.56:808
|
||||
112.85.209.32:808
|
||||
175.155.138.72:808
|
||||
60.184.174.136:808
|
||||
101.205.83.6:808
|
||||
114.230.234.23:808
|
||||
59.62.165.170:808
|
||||
119.5.0.52:808
|
||||
115.220.147.126:808
|
||||
115.220.145.204:808
|
||||
119.7.217.169:808
|
||||
175.155.25.8:808
|
||||
123.55.191.17:808
|
||||
119.5.1.28:808
|
||||
115.192.96.8:808
|
||||
115.207.5.185:808
|
||||
175.155.24.59:808
|
||||
115.192.248.169:808
|
||||
113.69.61.246:808
|
||||
183.153.22.101:808
|
||||
115.213.250.47:808
|
||||
121.31.85.70:8123
|
||||
60.179.232.53:3128
|
||||
182.45.176.47:808
|
||||
120.40.132.196:28269
|
||||
60.184.175.123:808
|
||||
175.155.243.49:808
|
||||
114.103.38.34:808
|
||||
221.229.45.13:808
|
||||
183.128.44.99:808
|
||||
114.230.99.232:808
|
||||
175.155.246.219:808
|
||||
123.55.186.240:808
|
||||
125.106.92.229:808
|
||||
60.167.133.143:808
|
||||
175.155.24.53:808
|
||||
60.178.87.127:808
|
||||
115.220.149.22:808
|
||||
121.226.154.84:808
|
||||
115.220.144.98:808
|
||||
123.169.87.94:808
|
||||
115.202.186.59:808
|
||||
115.202.162.92:808
|
||||
115.215.71.28:808
|
||||
183.153.20.72:808
|
||||
175.155.242.81:808
|
||||
183.166.170.53:808
|
||||
36.99.206.247:808
|
||||
113.121.253.210:808
|
||||
113.58.233.119:808
|
||||
60.5.36.26:80
|
||||
113.121.253.210:808
|
||||
113.58.233.119:808
|
||||
60.5.36.26:80
|
||||
222.94.146.203:808
|
||||
222.94.145.189:808
|
||||
113.123.36.119:808
|
||||
221.229.45.158:808
|
||||
115.220.7.38:808
|
||||
121.61.103.187:808
|
||||
115.220.7.63:808
|
||||
121.206.19.141:808
|
||||
121.206.34.195:808
|
||||
121.206.34.243:808
|
||||
121.206.18.116:808
|
||||
121.206.18.227:808
|
||||
121.62.139.8:808
|
||||
175.155.240.41:808
|
||||
115.215.71.211:808
|
||||
175.155.245.169:808
|
||||
119.4.12.70:808
|
||||
115.220.146.225:808
|
||||
115.220.149.203:808
|
||||
115.220.3.164:808
|
||||
114.239.151.217:808
|
||||
121.61.102.56:808
|
||||
175.155.247.57:808
|
||||
49.86.62.113:808
|
||||
115.151.3.218:808
|
||||
175.155.243.96:808
|
||||
122.5.132.74:808
|
||||
121.61.102.120:808
|
||||
175.155.244.86:808
|
||||
113.58.232.103:808
|
||||
59.62.164.207:808
|
||||
114.99.10.100:808
|
||||
114.239.144.85:808
|
||||
182.34.16.113:808
|
||||
115.203.82.22:808
|
||||
223.245.197.9:808
|
||||
121.61.99.251:808
|
||||
60.178.86.85:808
|
||||
119.4.12.254:808
|
||||
114.239.2.218:808
|
||||
115.220.4.103:808
|
||||
113.69.255.95:808
|
||||
175.155.71.39:808
|
||||
125.92.33.242:808
|
||||
175.155.247.60:808
|
||||
115.151.4.182:808
|
||||
117.60.85.228:808
|
||||
222.85.39.125:808
|
||||
123.169.86.206:808
|
||||
36.99.206.254:808
|
||||
115.220.150.208:808
|
||||
175.155.240.87:808
|
||||
115.220.146.231:808
|
||||
61.157.198.66:8080
|
||||
175.155.246.212:808
|
||||
114.230.120.82:41753
|
||||
175.155.247.100:808
|
||||
120.42.123.131:21697
|
||||
182.45.52.80:808
|
||||
222.85.50.29:808
|
||||
182.45.41.201:808
|
||||
221.229.47.68:808
|
||||
115.220.2.161:808
|
||||
113.58.233.2:808
|
||||
1.194.191.60:808
|
||||
175.155.244.211:808
|
||||
115.220.5.64:808
|
||||
171.36.61.110:8123
|
||||
110.73.3.191:8123
|
||||
183.33.171.73:8118
|
||||
171.36.63.100:8123
|
||||
175.155.238.240:808
|
||||
113.121.46.90:808
|
||||
183.140.73.253:808
|
||||
125.122.94.165:808
|
||||
123.163.162.69:808
|
||||
114.239.149.210:808
|
||||
113.69.212.169:808
|
||||
59.62.118.96:808
|
||||
114.99.17.46:808
|
||||
221.229.44.14:808
|
||||
117.43.1.246:808
|
||||
123.163.162.43:808
|
||||
60.184.174.58:808
|
||||
221.229.46.49:808
|
||||
222.85.50.14:808
|
||||
122.241.73.113:808
|
||||
60.167.21.220:808
|
||||
218.64.92.161:808
|
||||
115.207.7.2:808
|
||||
171.37.158.198:8123
|
||||
115.220.1.118:808
|
||||
115.220.151.110:808
|
||||
218.64.92.170:808
|
||||
115.220.1.55:808
|
||||
114.238.23.56:808
|
||||
175.155.245.109:808
|
||||
122.241.75.50:808
|
||||
123.54.194.48:808
|
||||
180.115.11.163:23651
|
||||
180.118.242.210:808
|
||||
111.76.227.93:808
|
||||
110.73.53.37:8123
|
||||
218.64.93.135:808
|
||||
60.178.85.32:808
|
||||
115.220.144.38:808
|
||||
175.155.246.53:808
|
||||
221.229.46.56:808
|
||||
123.169.87.144:808
|
||||
115.220.3.42:808
|
||||
175.155.243.90:808
|
||||
113.12.65.154:1337
|
||||
121.31.147.83:8123
|
||||
115.202.176.26:808
|
||||
218.64.93.86:808
|
||||
182.88.46.80:8123
|
||||
60.184.193.111:808
|
||||
180.110.17.203:808
|
||||
115.203.68.119:808
|
||||
115.220.144.153:808
|
||||
175.155.152.56:808
|
||||
171.38.229.10:8123
|
||||
121.61.107.252:808
|
||||
121.226.168.63:808
|
||||
171.38.162.131:8123
|
||||
218.64.93.177:808
|
||||
123.169.34.81:808
|
||||
175.155.24.6:808
|
||||
112.84.112.62:80
|
||||
121.31.174.88:8123
|
||||
115.46.66.230:8123
|
||||
115.46.66.220:8123
|
||||
114.231.241.108:808
|
||||
119.5.217.120:808
|
||||
27.222.106.22:80
|
||||
59.62.121.30:808
|
||||
110.73.32.46:8123
|
||||
113.69.254.160:808
|
||||
171.38.200.188:8123
|
||||
171.38.67.136:8123
|
||||
36.249.26.158:808
|
||||
171.38.27.217:8123
|
||||
218.64.93.204:808
|
||||
175.155.241.20:808
|
||||
113.69.38.127:808
|
||||
119.5.1.6:808
|
||||
115.220.144.219:808
|
||||
119.7.217.146:808
|
||||
120.34.35.222:8998
|
||||
120.83.121.41:808
|
||||
123.169.88.6:808
|
||||
115.202.167.160:808
|
||||
220.160.10.59:808
|
||||
175.155.247.214:808
|
||||
125.106.224.62:808
|
||||
120.84.100.185:808
|
||||
113.69.252.255:808
|
||||
59.62.110.66:808
|
||||
110.73.30.204:8123
|
||||
123.55.186.73:808
|
||||
180.110.17.50:808
|
||||
113.122.10.253:808
|
||||
113.69.63.156:808
|
||||
180.119.65.217:3128
|
||||
113.69.63.56:808
|
||||
123.55.184.107:808
|
||||
112.194.165.166:808
|
||||
183.153.14.223:808
|
||||
182.121.22.52:8118
|
||||
182.42.36.116:808
|
||||
183.153.10.177:808
|
||||
119.7.81.69:808
|
||||
221.229.45.233:808
|
||||
114.230.97.1:31983
|
||||
112.194.171.231:808
|
||||
119.29.24.135:808
|
||||
119.7.77.215:808
|
||||
119.7.79.174:808
|
||||
119.7.79.175:808
|
||||
115.213.205.254:808
|
||||
113.69.38.216:808
|
||||
123.120.121.118:8118
|
||||
113.58.235.228:808
|
||||
60.167.20.47:808
|
||||
119.5.0.108:808
|
||||
1.197.58.184:808
|
||||
120.83.121.104:808
|
||||
218.64.93.156:808
|
||||
112.194.217.76:808
|
||||
125.120.221.50:808
|
||||
115.220.1.12:808
|
||||
153.36.39.126:808
|
||||
27.18.100.143:808
|
||||
113.69.255.41:808
|
||||
180.118.240.204:808
|
||||
180.110.133.31:808
|
||||
14.109.120.73:808
|
||||
122.4.40.131:24274
|
||||
|
|
|
@ -29,4 +29,4 @@ def _get_yaml():
|
|||
# return _get_yaml()["damatu"]
|
||||
#
|
||||
#
|
||||
# print _get_yaml()
|
||||
# print _get_yaml()["set"]["12306count"][1]["pwd"]
|
|
@ -20,7 +20,7 @@
|
|||
#ticket_black_list:加入小黑屋的等待时间,默认3 min
|
||||
#ticke_peoples: 乘客
|
||||
#damatu:打码兔账号,用于自动登录
|
||||
|
||||
#is_aotu_code是否自动打码,如果选择Ture,则调用打码兔打码,默认不使用打码兔
|
||||
set:
|
||||
station_date: "2018-02-06"
|
||||
station_trains:
|
||||
|
@ -39,21 +39,22 @@ set:
|
|||
set_type:
|
||||
- "二等座"
|
||||
- "一等座"
|
||||
# - "一等座"
|
||||
is_more_ticket: Ture
|
||||
select_refresh_interval: 1
|
||||
expect_refresh_interval: 1
|
||||
ticket_black_list_time: 3
|
||||
ticke_peoples:
|
||||
- "文贤平"
|
||||
- "梁敏"
|
||||
12306count:
|
||||
- uesr: "@qq.com"
|
||||
- pwd: "QWERTY"
|
||||
|
||||
ticke_peoples:
|
||||
- "文贤平"
|
||||
- "梁敏"
|
||||
select_refresh_interval: 1
|
||||
expect_refresh_interval: 1
|
||||
ticket_black_list_time: 3
|
||||
is_aotu_code: False
|
||||
|
||||
damatu:
|
||||
uesr: ""
|
||||
pwd: ""
|
||||
pwd: "wen1995"
|
||||
|
||||
|
||||
12306count:
|
||||
uesr: "@qq.com"
|
||||
pwd: "QWERTY"
|
||||
|
||||
|
|
103
init/login.py
103
init/login.py
|
@ -6,6 +6,7 @@ import re
|
|||
from time import sleep
|
||||
|
||||
from config.ticketConf import _get_yaml
|
||||
from PIL import Image
|
||||
from damatuCode.damatuWeb import DamatuApi
|
||||
from myUrllib import myurllib2
|
||||
|
||||
|
@ -21,13 +22,27 @@ def cookietp():
|
|||
|
||||
|
||||
def readImg():
|
||||
"""
|
||||
增加手动打码,只是登录接口,完全不用担心提交票的效率问题
|
||||
思路
|
||||
1.调用PIL显示图片
|
||||
2.图片位置说明,验证码图片中每个图片代表一个下标,依次类推,1,2,3,4,5,6,7,8
|
||||
3.控制台输入对应下标,按照英文逗号分开,即可手动完成打码,
|
||||
:return:
|
||||
"""
|
||||
|
||||
global randCode
|
||||
stoidinput("下载验证码...")
|
||||
img_path = './tkcode'
|
||||
result = myurllib2.get(codeimg)
|
||||
try:
|
||||
open(img_path, 'wb').write(result)
|
||||
randCode = DamatuApi(_get_yaml()["damatu"]["uesr"], _get_yaml()["damatu"]["pwd"], img_path).main()
|
||||
if _get_yaml()["is_aotu_code"]:
|
||||
randCode = DamatuApi(_get_yaml()["damatu"]["uesr"], _get_yaml()["damatu"]["pwd"], img_path).main()
|
||||
else:
|
||||
img = Image.open('./tkcode')
|
||||
img.show()
|
||||
codexy()
|
||||
except OSError as e:
|
||||
print (e)
|
||||
pass
|
||||
|
@ -52,48 +67,48 @@ def errorinput(text):
|
|||
return False
|
||||
|
||||
|
||||
# def codexy():
|
||||
# """
|
||||
# 获取验证码
|
||||
# :return: str
|
||||
# """
|
||||
#
|
||||
# Ofset = raw_input("[*] 请输入验证码: ")
|
||||
# select = Ofset.split(',')
|
||||
# global randCode
|
||||
# post = []
|
||||
# offsetsX = 0 # 选择的答案的left值,通过浏览器点击8个小图的中点得到的,这样基本没问题
|
||||
# offsetsY = 0 # 选择的答案的top值
|
||||
# for ofset in select:
|
||||
# if ofset == '1':
|
||||
# offsetsY = 46
|
||||
# offsetsX = 42
|
||||
# elif ofset == '2':
|
||||
# offsetsY = 46
|
||||
# offsetsX = 105
|
||||
# elif ofset == '3':
|
||||
# offsetsY = 45
|
||||
# offsetsX = 184
|
||||
# elif ofset == '4':
|
||||
# offsetsY = 48
|
||||
# offsetsX = 256
|
||||
# elif ofset == '5':
|
||||
# offsetsY = 36
|
||||
# offsetsX = 117
|
||||
# elif ofset == '6':
|
||||
# offsetsY = 112
|
||||
# offsetsX = 115
|
||||
# elif ofset == '7':
|
||||
# offsetsY = 114
|
||||
# offsetsX = 181
|
||||
# elif ofset == '8':
|
||||
# offsetsY = 111
|
||||
# offsetsX = 252
|
||||
# else:
|
||||
# pass
|
||||
# post.append(offsetsX)
|
||||
# post.append(offsetsY)
|
||||
# randCode = str(post).replace(']', '').replace('[', '').replace("'", '').replace(' ', '')
|
||||
def codexy():
|
||||
"""
|
||||
获取验证码
|
||||
:return: str
|
||||
"""
|
||||
|
||||
Ofset = raw_input("[*] 请输入验证码: ")
|
||||
select = Ofset.split(',')
|
||||
global randCode
|
||||
post = []
|
||||
offsetsX = 0 # 选择的答案的left值,通过浏览器点击8个小图的中点得到的,这样基本没问题
|
||||
offsetsY = 0 # 选择的答案的top值
|
||||
for ofset in select:
|
||||
if ofset == '1':
|
||||
offsetsY = 46
|
||||
offsetsX = 42
|
||||
elif ofset == '2':
|
||||
offsetsY = 46
|
||||
offsetsX = 105
|
||||
elif ofset == '3':
|
||||
offsetsY = 45
|
||||
offsetsX = 184
|
||||
elif ofset == '4':
|
||||
offsetsY = 48
|
||||
offsetsX = 256
|
||||
elif ofset == '5':
|
||||
offsetsY = 36
|
||||
offsetsX = 117
|
||||
elif ofset == '6':
|
||||
offsetsY = 112
|
||||
offsetsX = 115
|
||||
elif ofset == '7':
|
||||
offsetsY = 114
|
||||
offsetsX = 181
|
||||
elif ofset == '8':
|
||||
offsetsY = 111
|
||||
offsetsX = 252
|
||||
else:
|
||||
pass
|
||||
post.append(offsetsX)
|
||||
post.append(offsetsY)
|
||||
randCode = str(post).replace(']', '').replace('[', '').replace("'", '').replace(' ', '')
|
||||
|
||||
|
||||
def login(user, passwd):
|
||||
|
@ -172,7 +187,7 @@ def getUserinfo():
|
|||
|
||||
|
||||
def main():
|
||||
login(_get_yaml()["12306count"]["uesr"], _get_yaml()["12306count"]["pwd"])
|
||||
login(_get_yaml()["set"]["12306count"][0]["uesr"], _get_yaml()["set"]["12306count"][1]["pwd"])
|
||||
|
||||
|
||||
def logout():
|
||||
|
|
|
@ -42,11 +42,11 @@ class select:
|
|||
station_date = ticket_info_config["set"]["station_date"].encode("utf8")
|
||||
set_type = ticket_info_config["set"]["set_type"]
|
||||
is_more_ticket = ticket_info_config["set"]["is_more_ticket"].encode("utf8")
|
||||
ticke_peoples = ticket_info_config["ticke_peoples"]
|
||||
select_refresh_interval = ticket_info_config["set"]["select_refresh_interval"]
|
||||
ticke_peoples = ticket_info_config["set"]["ticke_peoples"]
|
||||
select_refresh_interval = ticket_info_config["select_refresh_interval"]
|
||||
station_trains = ticket_info_config["set"]["station_trains"]
|
||||
expect_refresh_interval = ticket_info_config["set"]["expect_refresh_interval"]
|
||||
ticket_black_list_time = ticket_info_config["set"]["ticket_black_list_time"]
|
||||
expect_refresh_interval = ticket_info_config["expect_refresh_interval"]
|
||||
ticket_black_list_time = ticket_info_config["ticket_black_list_time"]
|
||||
print "*"*20
|
||||
print "当前配置:出发站:{0}\n到达站:{1}\n乘车日期:{2}\n坐席:{3}\n是否有票自动提交:{4}\n乘车人:{5}\n刷新间隔:{6}\n候选购买车次:{7}\n未开始刷票间隔时间:{8}\n僵尸票关小黑屋时长:{9}\n".format\
|
||||
(
|
||||
|
@ -218,7 +218,7 @@ class select:
|
|||
self.getRepeatSubmitToken()
|
||||
self.user_info = self.getPassengerDTOs()
|
||||
if self.checkOrderInfo():
|
||||
if self.getQueueCount(train_no):
|
||||
if self.getQueueCount(train_no, self._station_seat[j].encode("utf8")):
|
||||
break
|
||||
else:
|
||||
pass
|
||||
|
@ -370,7 +370,7 @@ class select:
|
|||
print (checkOrderInfo['messages'][0])
|
||||
print ("排队失败,重新刷票中")
|
||||
|
||||
def getQueueCount(self, train_no):
|
||||
def getQueueCount(self, train_no, set_type):
|
||||
"""
|
||||
# 模拟查询当前的列车排队人数的方法
|
||||
# 返回信息组成的提示字符串
|
||||
|
@ -400,12 +400,17 @@ class select:
|
|||
if "status" in getQueueCountResult and getQueueCountResult["status"] is True:
|
||||
if "countT" in getQueueCountResult["data"]:
|
||||
ticket = getQueueCountResult["data"]["ticket"]
|
||||
ticket_split = ticket.split(",")[1] if ticket.find(",") != -1 else ticket
|
||||
if set_type == "无座": # 修改无座和硬座的座位号提交是个字符串的问题
|
||||
ticket = ticket_split[1]
|
||||
elif set_type == "硬座":
|
||||
ticket = ticket_split[0]
|
||||
countT = getQueueCountResult["data"]["countT"]
|
||||
if int(countT) is 0:
|
||||
print("排队成功, 当前余票还剩余:" + ticket + "张")
|
||||
if int(ticket) < len(self.user_info):
|
||||
print("当前余票数小于乘车人数,放弃订票")
|
||||
else:
|
||||
print("排队成功, 当前余票还剩余:" + ticket + "张")
|
||||
if self.checkQueueOrder():
|
||||
return True
|
||||
else:
|
||||
|
|
|
@ -2,3 +2,5 @@ beautifulsoup4==4.5.3
|
|||
bs4==0.0.1
|
||||
PyYAML==3.12
|
||||
six==1.10.0
|
||||
requests==2.18.4
|
||||
Pillow==5.0.0
|
Loading…
Reference in New Issue