Commit 076d512c by 马玮

Fix capture store

parent e42429be
......@@ -34,7 +34,7 @@ if (!program.password) {
}
const validTasks = ['saveAccount'];
if (program.task && !validTasks.includes(program.task)) {
commandError.push('网站类型不合法!');
commandError.push('任务类型不合法!');
}
const validWebsites = ['autohome', 'easypass'];
......
......@@ -14,9 +14,8 @@ captcha.decode = async (captchaType, imageFile) => {
captcha.decodeBase64 = async (captchaType, base64Text) => {
const imageFile = 'tmp/captcha/' + (new Date) . getTime() + '.gif';
const writeStream = fs.createWriteStream(imageFile);
// data:image/png;base64, + base64Text
writeStream.write(base64Text, 'base64');
fs.writeFileSync(imageFile, base64Text, 'base64');
if (fs.existsSync(imageFile) && fs.statSync(imageFile).isFile()) {
const captchaText = this.decode(captchaType, imageFile);
......
......@@ -158,8 +158,8 @@ class Autohome {
await
horseman
.click('[id="btnDealer"]')
.wait(2000)
.waitForNextPage({ timeout: 10000 })
.wait(1000)
// .waitForNextPage({ timeout: 10000 })
.screenshot('tmp/workflow/autohome/submitLoginForm.png')
.exists('#loginout');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment