From 49754dfeb01e88fb16c02e7b86357a543b82b252 Mon Sep 17 00:00:00 2001 From: skinnynpale Date: Sat, 14 Mar 2020 20:06:11 +0700 Subject: [PATCH] - Fixed timeout --- package.json | 7 ++----- src/index.ts | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 4752731..61d1624 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "get-audio-vk", - "version": "3.1.0", + "version": "3.1.1", "description": "Parse open audios from user or public in VK", "main": "dist/index.js", "author": "skinnynpale", @@ -9,10 +9,7 @@ "build": "rimraf dist && tsc", "lint": "eslint src/**/*", "prepare": "yarn build", - "prepublishOnly": "yarn lint", - "preversion": "yarn lint", - "version": "git add -A src", - "postversion": "git push && git push --tags" + "prepublishOnly": "yarn lint" }, "license": "MIT", "dependencies": { diff --git a/src/index.ts b/src/index.ts index 558dc69..b79d8f3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -116,9 +116,9 @@ class ParseAudios { this.config.pass ); await page.click("#login_button"); - await page.waitFor("div.top_profile_name", { timeout: 3000 }).catch(() => { + await page.waitFor("div.top_profile_name", { timeout: 10000 }).catch(() => { throw new Error( - "Timeout 3s \n Failed to auth, possible reasons: \n 1. Incorrect login or password \n 2. Showed captcha \n 3." + + "Timeout 10s \n Failed to auth, possible reasons: \n 1. Incorrect login or password \n 2. Showed captcha \n 3." + " Slowly internet" ); });