instagram-apis
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -7,3 +7,2 @@ const instagramLogin = require("./src/instagramLogin.js"); | ||
async init(param) { | ||
console.log("Inside") | ||
this.username = param.username; | ||
@@ -10,0 +9,0 @@ this.password = param.password; |
{ | ||
"name": "instagram-apis", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Insatgram library filled with useful Instagram API's", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,3 +6,3 @@ const axios = require("axios"); | ||
module.exports = class { | ||
module.exports = class { | ||
constructor(username, password) { | ||
@@ -33,8 +33,7 @@ this.username = username; | ||
return await this.filterCookie(headers["set-cookie"]); | ||
} catch ({response: {data}}) { | ||
console.log(res) | ||
// if (data.message === "challenge_required") { | ||
// let apiPath = data.challenge.api_path; | ||
// return await this.postChoice(apiPath); | ||
// } | ||
} catch ({ response: { data } }) { | ||
if (data.message === "challenge_required") { | ||
let apiPath = data.challenge.api_path; | ||
return await this.postChoice(apiPath); | ||
} | ||
} | ||
@@ -114,2 +113,2 @@ throw new Error("Error In Login"); | ||
} | ||
} | ||
}; |
37649
774