Skip to content

Commit

Permalink
feat: add 企查查 provider
Browse files Browse the repository at this point in the history
  • Loading branch information
WindomZ committed Dec 2, 2017
1 parent 88a1f58 commit d8dfd8e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions app/providers/企查查.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
'use strict';

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

module.exports = class extends Provider {
constructor() {
super();
this.url = `http://www.qichacha.com/user_register`;
}

async resolve(ctx) {
const options = ctx.options;
const page = ctx.page;

await page.type('input[name=phone]', options.phone, { delay: 100 });

await page.type('input[name=pswd]', options.password, { delay: 50 });

await page.mouse.move(841, 345);
await page.mouse.down();
await page.mouse.move(1101, 346, { steps: 20 });
await page.mouse.up();

await page.click('a.get-mobile-code');

// await page.waitForSelector('span.input-group-btn button:first-child[disabled]', { timeout: 1000 * 3 });
}
};

0 comments on commit d8dfd8e

Please sign in to comment.