Giter Site home page Giter Site logo

chrome_12306's Introduction

12306 Chrome插件, 已实现验证码自动识别

开发

首先你应该具备Web前端Node开发的能力

npm install

之后运行:

npm start

安装

Chrome打开扩展程序管理页, 勾选开发者模式, 点击加载已解压的扩展程序选择构建生成的dist目录

验证码自动识别

依靠百度云-文字识别百度图片

点击获取 百度云-文字识别 appId/appKey/appSecret, 填入抢票页面中(url默认)

TODO: 正确率还需要进一步提高

问题

  • 12306登陆自动退出(非插件问题)

加入我们

  • git push

chrome_12306's People

Contributors

elgogle avatar feix760 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chrome_12306's Issues

macOS下工作不正常

macOS下车次选择框是空的,所有信息填好,登录了,也无法选择车次。什么原因?

npm install error

C:\Users\Administrator\Desktop\train\3js\Chrome_12306>npm install
npm ERR! Unexpected token < in JSON at position 0 while parsing near '<title>L...'

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2018-01-11T0
7_10_55_780Z-debug.log

验证码提交失败

使用自动验证码提交会出现如下错误:获取自动识别验证码失败 undefined.
代码错误提示:

Error: non-error thrown: [object Object]
      at Object.onerror (~/Chrome_12306/node_modules/koa/lib/context.js:108:40)
      at onerror (~/Chrome_12306/node_modules/koa/lib/application.js:147:32)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

npm install失败

失败在canvas的安装上。可否给出更详细的安装文档。

将轮询操作放到background page是否可行

如果可以将轮询,提示,预定操作放置到background page,然后在permission中加入background,就可以不用一直开着标签页,甚至不用打开chrome的前端界面

订单提交失败

如下,订单提交失败

000278硬座:- 无座:- 硬卧:- 软卧:- 二等座:有 一等座:有
000279发现有票车: G673 二等座 有 准备提交中...
000280提交失败 [object Object]
000281停止查询
00028201-14 查询成人票..
00028301-14 G673:预订
000284硬座:- 无座:- 硬卧:- 软卧:- 二等座:有 一等座:有
000285发现有票车: G673 二等座 有 准备提交中...
000286提交失败 [object Object]

希望能开发同时抢不同日期票的功能

观察了插件的思路,每一次轮询,都会自动获取文本框里的发站、终站和日期等内容,如果能将这些信息独立存储到不同的任务中去,应该可以实现同时抢不同日期的火车票,同时还可以抢不同始发站和终到站的票

fis3 release -w dev这条命令太多坑了

先是operation not permitted, scandir C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\Windows\INetCache\Content.IE5
删掉了Content.IE5
然后又是resource busy or locked open C:\WINDOWS\system32\config\BBI.LOG1
win10上怎么这么难运行fis3

npm start error

npm v5.6
nodejs v8.9.4

RROR in ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./src/page/index/component/login/index.scss
Module build failed: Error: ENOENT: no such file or directory, scandir '/home/ro4k/Chrome_12306/node_modules/node-sass/vendor'
    at Object.fs.readdirSync (fs.js:904:18)
    at Object.getInstalledBinaries (/home/ro4k/Chrome_12306/node_modules/node-sass/lib/extensions.js:128:13)
    at foundBinariesList (/home/ro4k/Chrome_12306/node_modules/node-sass/lib/errors.js:20:15)
    at foundBinaries (/home/ro4k/Chrome_12306/node_modules/node-sass/lib/errors.js:15:5)
    at Object.module.exports.missingBinary (/home/ro4k/Chrome_12306/node_modules/node-sass/lib/errors.js:45:5)
    at module.exports (/home/ro4k/Chrome_12306/node_modules/node-sass/lib/binding.js:15:30)
    at Object.<anonymous> (/home/ro4k/Chrome_12306/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/ro4k/Chrome_12306/node_modules/sass-loader/lib/loader.js:3:14)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at loadLoader (/home/ro4k/Chrome_12306/node_modules/loader-runner/lib/loadLoader.js:13:17)
    at iteratePitchingLoaders (/home/ro4k/Chrome_12306/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at iteratePitchingLoaders (/home/ro4k/Chrome_12306/node_modules/loader-runner/lib/LoaderRunner.js:165:10)
    at /home/ro4k/Chrome_12306/node_modules/loader-runner/lib/LoaderRunner.js:173:18
    at loadLoader (/home/ro4k/Chrome_12306/node_modules/loader-runner/lib/loadLoader.js:36:3)
    at iteratePitchingLoaders (/home/ro4k/Chrome_12306/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
    at runLoaders (/home/ro4k/Chrome_12306/node_modules/loader-runner/lib/LoaderRunner.js:362:2)
    at NormalModule.doBuild (/home/ro4k/Chrome_12306/node_modules/webpack/lib/NormalModule.js:182:3)
 @ ./src/page/index/component/login/index.scss 4:14-141
 @ ./src/page/index/component/login/index.js
 @ ./src/page/index/index.js

npm install error

npm版本5.5.1

——————————————————————————————————————————————

在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
MSBUILD : error MSB4132: 无法识别工具版本“2.0”。可用的工具版本为 "4.0"。
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:159:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\localhost\www\Chrome_12306\node_modules\canvas
gyp ERR! node -v v9.2.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\i\AppData\Roaming\npm-cache_logs\2018-01-15T08_23_55_012Z-debug.log
PS D:\localhost\www\Chrome_12306> npm install/m
——————————————————————————————————————————————
log日志错误信息
warn [email protected] No repository field.
1100 warn [email protected] No license field.
1101 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
1102 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.