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

Is this Libarary unusable now? #296

Open umang350 opened 2 years ago

umang350 commented 2 years ago

It seems it doesn't works in any way, thus please add note to the readme for saving time of developers stumbling upon this library.

291

emauriciomoreno commented 1 year ago

Yes, that's right, the library has stopped working. At the point where it gets the csrf_token, before the login process

ubaidimranofficial commented 1 year ago

I have a solution for that :_

emauriciomoreno commented 1 year ago

Please tell me

ubaidimranofficial commented 1 year ago

You can update this code, I just debugged the issue and solved it on a production level. :) Thanks, me later.

let value = this.request('/', { resolveWithFullResponse: true }).then(res => {
      const pattern = new RegExp(/(csrf_token\\":\\")[\w]+/)
      const matches = res.body.match(pattern)
      value = matches[0].substring(15)
    })
emauriciomoreno commented 1 year ago

Thanks a lot. you saved my day

tusharsinghal1610 commented 1 year ago

Thanks a lot @ubaidimranofficial

espressostack commented 1 year ago

@ubaidimranofficial Thanks a lot bro

DreamBoy65 commented 1 year ago

You can update this code, I just debugged the issue and solved it on a production level. :) Thanks, me later.

let value = this.request('/', { resolveWithFullResponse: true }).then(res => {
      const pattern = new RegExp(/(csrf_token\\":\\")[\w]+/)
      const matches = res.body.match(pattern)
      value = matches[0].substring(15)
    })

now its giving: Screenshot_20221124-183505_Termux

quaint-racoon commented 1 year ago

Got same error as the guy above any solutions?

360macky commented 1 year ago

You can update this code, I just debugged the issue and solved it on a production level. :) Thanks, me later.

let value = this.request('/', { resolveWithFullResponse: true }).then(res => {
      const pattern = new RegExp(/(csrf_token\\":\\")[\w]+/)
      const matches = res.body.match(pattern)
      value = matches[0].substring(15)
    })

Wait, but where I put this?

quaint-racoon commented 1 year ago

You can update this code, I just debugged the issue and solved it on a production level. :) Thanks, me later.

let value = this.request('/', { resolveWithFullResponse: true }).then(res => {
      const pattern = new RegExp(/(csrf_token\\":\\")[\w]+/)
      const matches = res.body.match(pattern)
      value = matches[0].substring(15)
    })

Wait, but where I put this?

U edit the package code itself and replace the bugged code

360macky commented 1 year ago

You can update this code, I just debugged the issue and solved it on a production level. :) Thanks, me later.

let value = this.request('/', { resolveWithFullResponse: true }).then(res => {
      const pattern = new RegExp(/(csrf_token\\":\\")[\w]+/)
      const matches = res.body.match(pattern)
      value = matches[0].substring(15)
    })

Wait, but where I put this?

U edit the package code itself and replace the bugged code

Wow, okay. Thank you.

ardinusawan commented 1 year ago

For everyone who looking for solution: Based on this youtube desc: https://www.youtube.com/watch?v=XzyYi_yv86A

  1. Create an empty directory in the root of your app called "instagram-web-api"
  2. Copy the index.js file from my GitHub repo (https://github.com/amamenko/inky-dood... into that directory.
  3. Substitute your current import of the "Instagram" object from the instagram-web-api library in your app with const Instagram = require("./instagram-web-api/index");