Skip to content

Commit

Permalink
feat: 添加97gg
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Oct 2, 2017
1 parent e783e1c commit 1134439
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 11 deletions.
43 changes: 43 additions & 0 deletions app/providers/97gg.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
const Provider = require('../provider');

const config = require('../config');

const utils = require('../utils');

class JiuQiGeGeProvider extends Provider {
constructor() {
super();
this.url = `https://97gg.net/Account/Register`;
}
async resolve(ctx) {
const options = ctx.options;

const page = ctx.page;

const $phoneRegister = await page.$('#phoneRegistTab');

await $phoneRegister.click();

await utils.sleep(1000);

const [$mobile, $password, $repassword, $submit] = await Promise.all([
page.$('#UserName'),
page.$('#Password'),
page.$('#ConfirmPassword'),
page.$('#chkCodeSendBtn')
]);

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

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

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

await $submit.click();
}
}

module.exports = JiuQiGeGeProvider;
24 changes: 13 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const IQiYiProvider = require('./app/providers/iqiyi');
const XiaoMiProvider = require('./app/providers/xiaomi');
const SixYueGameProvider = require('./app/providers/6yuecom');
const GaoDeProvider = require('./app/providers/gaode');
const JiuQiGeGeProvider = require('./app/providers/97gg');

new App({
username: 'abc1333llgo',
Expand All @@ -18,15 +19,16 @@ new App({
phone: '13377175342',
once: true
})
.provider(QQProvider)
.provider(AliyunProvider)
.provider(TaobaoProvider)
.provider(JuheProvider)
.provider(XiangRiKuiProvider)
.provider(YoukuProvider)
.provider(AliPayProvider)
.provider(IQiYiProvider)
.provider(XiaoMiProvider)
.provider(SixYueGameProvider)
.provider(GaoDeProvider)
// .provider(QQProvider)
// .provider(AliyunProvider)
// .provider(TaobaoProvider)
// .provider(JuheProvider)
// .provider(XiangRiKuiProvider)
// .provider(YoukuProvider)
// .provider(AliPayProvider)
// .provider(IQiYiProvider)
// .provider(XiaoMiProvider)
// .provider(SixYueGameProvider)
// .provider(GaoDeProvider)
.provider(JiuQiGeGeProvider)
.bootstrap({ autoClose: false });

0 comments on commit 1134439

Please sign in to comment.