How to login successfully in Instaloader in python?

Viewed 1304

I am trying to scrape data from Instagram using the 'instaloader' python modules. When using this code:

import instaloader

L = instaloader.Instaloader()
L.login(USERNAME, PASSWORD)

The code throws the following error:

ConnectionException: Login error: Unexpected response, this might indicate a blocked IP.

I've tried looking through the documentation and GitHub issues, but can't seem to find a solution. Please advise how to login successfully, or any other modules that I can use to scrape data?

2 Answers

This can be resolved by logging in to your browser and then running the script.

I'm not sure of the cause, but that's how I fixed it.

Please note some of Instaloaders functionalities are currently not working, presumably due to an update on Instagram.

It might be looks like your ip is blocked by Instagram server.

Related