Super lightweight Instagram web scraper for data analysis
Project description
instascrape
Lightweight Python 3 web scraper for data mining Instagram easily and efficiently!
Table of Contents
Installation
Clone
- Clone to your local machine using
$ git clone https://github.com/chris-greening/instascrape.git
Setup
- Install required dependencies using
$ pip3 install -f requirements.txt
Features
Profile
Representation of an Instagram profile. Calling static_load takes care of requesting and scraping static HTML regarding the given URL or username. Profile.static_load scrapes 36 data points including
- followers: int
- following: int
- post count: int
- profile pic URL: str
- business account: bool
- verified: bool
- etc.
from instascrape import Profile
url = 'https://www.instagram.com/gvanrossum/'
post = Profile(url)
post.static_load()
Post
Representation of a single Instagram post. Calling static_load takes care of requesting and scraping static HTML regarding the given URL or post shortcode. Post.static_load scrapes 29 data points including
- amount of likes: int
- amount of comments: int
- hashtags used: List[str]
- usernames tagged: List[str]
- caption: str
- location: str
- etc.
from instascrape import Post
url = 'https://www.instagram.com/p/CFcSLyBgseW/'
post = Post(url)
post.static_load()
Hashtag
Representation of an Instagram hashtag page. Calling static_load takes care of requesting and scraping static HTML regarding the given URL or hashtag name. Hashtag.static_load scrapes 10 data points including
- amount of posts: int
- pic URL: str
- name: str
- user is following: bool
- allowed to follow: bool
- etc.
from instascrape import Hashtag
url = 'https://www.instagram.com/explore/tags/python/'
hashtag = Hashtag(url)
hashtag.static_load()
Support
Reach out to me if you have questions or ideas!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for insta_scrape-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 304f8c5ce155c7b7ab0abc23c2d793948e265e2987ebe5cbea902d7b49a995ec |
|
MD5 | 1c96b656c0dfb798972be65c7220f1ce |
|
BLAKE2b-256 | 7b5d1cc685dcba212249c08379bc826de67e32d74b5bcd37c9318b09142b1994 |