https://github.com/scriptsmith/instaphyte
Fast and simple Instagram hashtag and location scraper
https://github.com/scriptsmith/instaphyte
data-mining instagram instagram-api instagram-scraper
Last synced: 4 months ago
JSON representation
Fast and simple Instagram hashtag and location scraper
- Host: GitHub
- URL: https://github.com/scriptsmith/instaphyte
- Owner: ScriptSmith
- License: mit
- Created: 2019-01-20T11:58:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-03T19:40:08.000Z (about 1 year ago)
- Last Synced: 2025-02-26T12:03:36.368Z (5 months ago)
- Topics: data-mining, instagram, instagram-api, instagram-scraper
- Language: Python
- Size: 17.6 KB
- Stars: 19
- Watchers: 9
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Instaphyte
[](https://travis-ci.org/ScriptSmith/instaphyte)
[](https://app.codacy.com/project/ScriptSmith/instaphyte/dashboard)
[](https://app.codacy.com/project/ScriptSmith/instaphyte/dashboard)
[](https://github.com/ScriptSmith/instaphyte/blob/master/LICENSE)
[](https://adamsm.com/instagram-speed-test)Fast and simple Instagram hashtag scraper.
For a more powerful scraper, try [Instamancer](https://github.com/scriptsmith/instamancer)
## Install
### From this repository
```
git clone https://github.com/scriptsmith/instaphyte.git
cd instaphyte
pip3 install -e .
```### From PIP
```
pip install instaphyte
```## Usage
### Command Line
```
$ instaphyte
usage: instaphyte [-h] [--count COUNT] [--download] [--silent]
[--waitDownload] [--filename FILENAME]
[--filetype {csv,json,both}] [--downdir DOWNDIR]
{hashtag,location} idScrape Instagram hashtag and location feeds
positional arguments:
{hashtag,location} The type of feed to scrape posts from
id The id of the feed to scrape posts fromoptional arguments:
-h, --help show this help message and exit
--count COUNT, -c COUNT
Number for posts to download. 0 to download all
--download, -d Save images from posts
--silent Disable progress output
--waitDownload, -w Only download media once scraping is finished
--filename FILENAME, --file FILENAME, -f FILENAME
Name of the output file
--filetype {csv,json,both}, --type {csv,json,both}, -t {csv,json,both}
Type of output file
--downdir DOWNDIR Directory to save media```
Example:
```
instaphyte hashtag selfie --count=1000 -d
```### Module
Example:
```python
from instaphyte import Instagramapi = Instagram()
# Get 1000 posts from #selfie
for post in api.hashtag("selfie", 1000):
print(post)# Get all posts tagged as being in London
for post in api.location("213385402"):
print(post)
```