instagram-graphql-scraper is a command-line application written in Python that scrapes posts and complete metadata(caption, image-link, description, time-stamp, location), from instagram's explore location page. The novelty lies in the option to provide min and max date, hence giving an option to scrape old posts as well.
To install insta-graphql--scraper:
$ pip install insta-graphql-scraper
To update insta-graphql-scraper:
$ pip install insta-graphql-scraper --upgrade
$ scrape [-h] [--dir DIR] --max MAX_DATE --min MIN_DATE --location LOCATION
[--restore-cursor] [--log-level LOG_LEVEL]
- Standard:
python scraper.py --max "2020/07/15" --min "2020/06/15" --location "New-York-City"
- Custom directory:
python scraper.py --dir "./data" --max "2020/07/15" --min "2020/06/15" --location "New-York-City " --restore-cursor
- Log debug messages:
python scraper.py --max "2020/07/15" --min "2020/06/15" --location "New-York-City" -- log-level 10
- Restore from last saved post:
python scraper.py --max "2020/07/15" --min "2020/06/15" --location "New-York-City" --restore-cursor