instagram-data is a command-line application written in Python that scrapes the top 200 Instagram influencers' username and follower count from this website using instagrapi and downloads their profile pictures.
To install instagram-data:
$ pip install instagram-data
To update instagram-scraper:
$ pip install instagram-data --upgrade
Alternatively, you can clone the project and run the following command to install: Make sure you cd into the instagram-data-master folder before performing the command below.
$ python setup.py install
To scrape a user's media:
$ instagram-data
You will then be prompted to enter your username:
Enter your username:
Then your password:
Enter your password:
If credentials are incorrect an error message will pop up, and you will be prompted to retry:
Password does not match with that username. Try again.
Enter your username:
If everything is done correctly, the program will begin processing each index:
Processing index: 0/199
Once the program is finished it will output:
Done
The data will be placed as an array of dictionaries for JS in instagram_data/data.txt
.
Downloaded profile pictures will be placed in instagram_data/img
.
from instagram_data import scrape
scrape("USERNAME", "PASSWORD") # Replace USERNAME and PASSWORD with your Instagram credentials
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Check the open issues or open a new issue to start a discussion around your feature idea or the bug you found
- Fork the repository and make your changes
- Send a pull request
MIT License
Copyright (c) 2022 Eric Wong
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.