instagrapi
Advanced tools
Comparing version 4.2.1 to 4.2.2
@@ -51,3 +51,3 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var isUrl, url, endpoint, _a, status_1, data, error_1; | ||
var isUrl, endpoint, headers, _a, status_1, data, error_1; | ||
return __generator(this, function (_b) { | ||
@@ -57,12 +57,16 @@ switch (_b.label) { | ||
isUrl = query.search(/^(https?)/) > -1; | ||
url = isUrl ? query : "".concat(_UTILS_1.configApi.urlBase, "/").concat(query); | ||
endpoint = url + '/?__a=1'; | ||
if (isUrl) { | ||
endpoint = query; | ||
headers = {}; | ||
} | ||
else { | ||
endpoint = "".concat(_UTILS_1.configApi.urlBase, "/").concat(query); | ||
headers = { | ||
cookie: "sessionid=".concat(this.id) | ||
}; | ||
} | ||
_b.label = 1; | ||
case 1: | ||
_b.trys.push([1, 3, , 4]); | ||
return [4, axios_1.default.get(endpoint, { | ||
headers: { | ||
cookie: "sessionid=".concat(this.id) | ||
} | ||
})]; | ||
return [4, axios_1.default.get("".concat(endpoint, "/?__a=1"), { headers: headers })]; | ||
case 2: | ||
@@ -69,0 +73,0 @@ _a = _b.sent(), status_1 = _a.status, data = _a.data; |
{ | ||
"name": "instagrapi", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"description": "Library to obtain information from an Instagram account in a friendly and intuitive way", | ||
@@ -25,3 +25,3 @@ "keywords": [ | ||
"dev": "nodemon --config", | ||
"prepublish": "yarn build && yarn test", | ||
"pre-publish": "yarn build && yarn test && yarn try-publish", | ||
"try-publish": "npm publish --dry-run", | ||
@@ -28,0 +28,0 @@ "build-ts": "tsc && tsc-alias", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34087
553