Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

zaironjacobs/instagram-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instagram Scraper - DEPRECATED

A command-line application that uses Selenium to download all posts from an Instagram profile.

Install

To install:

$ python setup.py install

Usage

Create a new directory and cd into the directory.

Use --max to specify a maximum amount of posts to scrape

Scrape a profile:

$ igscraper username1 username2 username3 --max 5

To scrape stories you have to be logged in first:

$ igscraper username1 username2 username3 --max 5 --stories --login-username username

Scrape a tag:

$ igscraper --recent-tags tag1 tag2 --max 10
$ igscraper --top-tags tag1 tag2 --max 3

List all scraped users or tags:

$ igscraper --list-users
$ igscraper --list-tags

Remove users or tags:

$ igscraper --remove-users username1 username2
$ igscraper --remove-tags tag1 tag2

Remove users or tags by list number:

$ igscraper --remove-users-n 1 2
$ igscraper --remove-tags-n 1 2

Downloads can be found at:

<current directory>/<users>/<username>/<display_photo>

<current directory>/<users>/<username>/<posts>

<current directory>/<users>/<username>/<stories>

<current directory>/<tags>/<tag>/<top>

<current directory>/<tags>/<tag>/<recent>

Scraping the same profile again will only download new posts, provided that you are inside the same directory when you run the program again.

Options

--help                  Show help message and exit.

--login-username        Instagram login username.

--update-users          Check all previously scraped users for new posts.

--top-tags              Top tags to scrape.

--recent-tags           Recent tags to scrape (also provide a maximum amount of posts to download with --max).

--max                   Maximum number of posts to scrape.

--stories               Scrape stories also.

--headful               Display the browser UI.

--list-users            List all scraped users.

--list-tags             List all scraped tags.

--remove-users          Remove user(s).

--remove-users-n        Remove user(s) by number.

--remove-all-users      Remove all users.

--remove-tags           Remove tag(s).

--remove-tags-n         Remove tag(s) by number.

--remove-all-tags       Remove all tags.

--log                   Create log file.

--version               Program version.

About

A command-line application that uses Selenium to download all posts from an Instagram profile.

Topics

Resources

License

Stars

Watchers

Forks

Languages