Skip to content

Commit

Permalink
- Fixed timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
skinnynpale committed Mar 14, 2020
1 parent 47ed371 commit 49754df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
);
});
Expand Down

0 comments on commit 49754df

Please sign in to comment.