Skip to content

Commit

Permalink
feat: 添加牛竞猜
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Oct 9, 2017
1 parent c01ee89 commit 38974c1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions app/providers/牛竞猜.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const Provider = require('../provider');

module.exports = class extends Provider {
constructor() {
super();
this.url = 'http://niugames.cc/Index/Index/Register.html';
}
async resolve(ctx) {
const options = ctx.options;
const page = ctx.page;

const [$mobile, $code, $submit] = await Promise.all([
page.$('input[name="phone"]'),
page.$('input.phoneVerify'),
page.$('.phoneVerifyBtn')
]);

await $mobile.click();
await page.type(options.phone, { delay: 100 });

await $code.click();
await page.type('1234', { delay: 100 });

await $submit.click();
}
};

0 comments on commit 38974c1

Please sign in to comment.