Skip to content

keepsimple7/ig-scraper

Repository files navigation

IG Scraper

Usage as library

from pprint import pprint
import instagram_scraper

args = {"login_user": "LOGIN", "login_pass": "PASSWORD"}

insta_scraper = instagram_scraper.InstagramScraper(**args)
insta_scraper.authenticate_with_login()
shared_data = insta_scraper.get_shared_data_userinfo(username='SCRAPED_USERNAME')

arr = []

for item in insta_scraper.query_media_gen(shared_data):
    arr.append(item)

pprint(arr)

Docker

How to install Docker see https://docs.docker.com/engine/install/.

Don't forget to run postinstall steps for Linux https://docs.docker.com/engine/install/linux-postinstall/.

Build

$ docker build -t ig-scraper .

Run

$ docker run -it --rm -v $(pwd)/data:/ig-scraper/data ig-scraper -i -d data/<folder_name> <params>

If you want to save cookiejar to you HDD you have to run it like this:

$ docker run -it --rm -v $(pwd)/data:/ig-scraper/data ig-scraper -i -d data/<folder_name> --cookiejar data/my_cookies <params>

Run built image

You could run already built image from here https://github.com/arc298/ig-scraper/pkgs/container/ig-scraper/versions

$ docker run -it --rm -v $(pwd)/data:/ig-scraper/data ghcr.io/arc298/ig-scraper:latest -i -d data/<folder_name> --cookiejar data/my_cookies <params>

Develop

Clone the repo and create a virtualenv

$ virtualenv venv
$ source venv/bin/activate
$ python setup.py develop

Running Tests

$ python setup.py test

# or just 

$ nosetests

Contributing

  1. Check the open issues or open a new issue to start a discussion around your feature idea or the bug you found

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published