首先你应该具备Web前端
和Node开发的能力
npm install
之后运行:
npm start
Chrome打开扩展程序管理页, 勾选开发者模式
, 点击加载已解压的扩展程序
选择构建生成的dist
目录
点击获取 百度云-文字识别
appId/appKey/appSecret, 填入抢票页面中(url默认)
TODO: 正确率还需要进一步提高
- 12306登陆自动退出(非插件问题)
git push
12306 Chrome抢票插件
已经通过实名并激活了,没找到界面里哪里找到这对KEY。
macOS下车次选择框是空的,所有信息填好,登录了,也无法选择车次。什么原因?
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)
失败在canvas的安装上。可否给出更详细的安装文档。
如果可以将轮询,提示,预定操作放置到background page,然后在permission中加入background,就可以不用一直开着标签页,甚至不用打开chrome的前端界面
如下,订单提交失败
000278硬座:- 无座:- 硬卧:- 软卧:- 二等座:有 一等座:有
000279发现有票车: G673 二等座 有 准备提交中...
000280提交失败 [object Object]
000281停止查询
00028201-14 查询成人票..
00028301-14 G673:预订
000284硬座:- 无座:- 硬卧:- 软卧:- 二等座:有 一等座:有
000285发现有票车: G673 二等座 有 准备提交中...
000286提交失败 [object Object]
观察了插件的思路,每一次轮询,都会自动获取文本框里的发站、终站和日期等内容,如果能将这些信息独立存储到不同的任务中去,应该可以实现同时抢不同日期的火车票,同时还可以抢不同始发站和终到站的票
初学者努力学习中
先是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 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版本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"})
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.