Super lightweight Instagram web scraper for data analysis
Project description
instascrape
Super lightweight Python 3 web scraping tools for data mining Instagram
Table of Contents
Installation
pip
Install from PyPI using
pip3 install insta-scrape
Clone
Clone right from Github to your local machine using
$ git clone https://github.com/chris-greening/instascrape.git
and 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
posts: int
profile_pic_url: str
is_business_account: bool
is_verified: bool
#etc.
Sample code:
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
likes: int
amount_of_comments: int
hashtags: List[str]
tagged_users: List[str]
caption: str
location: str
#etc.
Sample code:
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
name: str
is_following: bool
allow_following: bool
#etc.
Sample code:
from instascrape import Hashtag
url = 'https://www.instagram.com/explore/tags/python/'
hashtag = Hashtag(url)
hashtag.static_load()
License
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.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb02cb45b135e28e3615f4eb4bf38e3e0ed81220d9c4f369e8eb6570c9d56d78 |
|
MD5 | 47220cce12711d79532a20104d8beb1f |
|
BLAKE2b-256 | c4d4f6175f7219ccc07406e7dc4957e5a8b7b392ea5e72a315254f83624922f3 |