jlobos / instagram-web-api

🤳 Instagram Private Web API client for Node
https://npmjs.com/instagram-web-api
MIT License
1.12k stars 185 forks source link

Not liking anymore #266

Closed DerLomo closed 1 year ago

DerLomo commented 3 years ago

This is my code: `const Instagram = require('instagram-web-api') const FileCookieStore = require('tough-cookie-filestore2')

var username= process.argv[2] var password= process.argv[3] var val= process.argv[4] var comment= process.argv[5] var mediapp= process.argv[6] console.log(val) console.log(comment) console.log(mediapp) var j = { "dynamicText": "C:/Users/Sergi/AppData/Roaming/npm/node_modules/cookies/%s/cookies.json" //"dynamicText": "/home/pi/node_modules/cookies/%s/cookies.json" } function replace(toReplaceText, replaceWith) { let objText = j["dynamicText"].replace(toReplaceText, replaceWith); return objText; } ruta= replace('%s', username) const cookieStore = new FileCookieStore(ruta) client = new Instagram({ username, password, cookieStore }, { language: 'es-ES' })

;(async () => { client.login() client.like({ mediaId: mediapp }) client.save({ mediaId: mediapp }) if (val==1) { client.addComment({ mediaId: mediapp, text: comment }) console.log(media.id) } client.logout() })() But from today it drops this error: /home/bradi/node_modules/request-promise-core/lib/errors.js:32 Error.captureStackTrace(this); ^ <ref *9> StatusCodeError: 302 - undefined at new StatusCodeError (/home/bradi/node_modules/request-promise-core/lib/errors.js:32:15) at Request.plumbing.callback (/home/bradi/node_modules/request-promise-core/lib/plumbing.js:104:33) at Request.RP$callback [as _callback] (/home/bradi/node_modules/request-promise-core/lib/plumbing.js:46:31) at Request.self.callback (/home/bradi/node_modules/request/request.js:185:22) at Request.emit (node:events:394:28) at Request. (/home/bradi/node_modules/request/request.js:1154:10) at Request.emit (node:events:394:28) at IncomingMessage. (/home/bradi/node_modules/request/request.js:1076:12) at Object.onceWrapper (node:events:513:28) at IncomingMessage.emit (node:events:406:35) {`

Could you tell me whats wrong, i m losing my mind now. I only moved the js script from the node_modules because safty and now is not running I have tried to only login and there is no problem, but it appears with the likes

gumernus commented 3 years ago

i think this api is no more working

gumernus commented 3 years ago

i think this api is no more working

instagram has changed the api

MonsieurBibo commented 3 years ago

As I said multiple times before, this package isn't really maintained. You shouldn't expect anything to work

gumernus commented 3 years ago

As I said multiple times before, this package isn't really maintained. You shouldn't expect anything to work

true. too old update

troyam commented 1 year ago

Use lang: EN-US THE PASSWORD FILL NEED TOO COMPLETE WITH THE VALUE OF 'ATRIBUTE' Sometimes that's change.