Skip to main content

instascrape: super lightweight Instagram scraping toolkit

What is it?

instascrape is an incredibly lightweight set of tools geared towards scraping Instagram data. It makes no assumptions about your project and is instead designed for flexibility and developer productivity. It is excellent for for the seasoned data scientist trying to quickly get an idea of a pages engagement as well as beginners looking to explore web scraping and the beauty of Python for the very first time.

Version Language Code style: black Release License

Activity Dependencies Size


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

MIT


Support

Reach out to me if you have questions or ideas!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

insta-scrape-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

insta_scrape-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file insta-scrape-0.1.0.tar.gz.

File metadata

  • Download URL: insta-scrape-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4

File hashes

Hashes for insta-scrape-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4d290664a59ed264c8d908bedd15375e2dea85f24451d27beff1bdd2ac466bab
MD5 d06c07a281cafc101283b049c4236c3b
BLAKE2b-256 d0c65791de9241511c17189e1b687c9bec97285230c12e0ee7ce82cb0a8de77d

See more details on using hashes here.

File details

Details for the file insta_scrape-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: insta_scrape-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4

File hashes

Hashes for insta_scrape-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32d4ad1aefcdf63ec04d8d5e9c1833e692cb783cd1e469d081983273f4f77366
MD5 b50fe8209d84e67dbfeb4702d776d3b4
BLAKE2b-256 288f72a1e3be185722b14dcff991332d9da93861eb7460871f64c4ae6250ba5b

See more details on using hashes here.

Release history Release notifications | RSS feed

2.1.2

2 files

2.1.1

2 files

2.1.0

2 files

2.0.2

2 files

2.0.0

1 file

1.7.1

2 files

1.7.0

1 file

1.6.1

2 files

1.6.0

1 file

1.5.0

1 file

1.4.0

2 files

1.3.4

1 file

1.3.3

1 file

1.3.2

1 file

1.3.1

1 file

1.3.0

1 file

1.2.8

1 file

1.2.7

1 file

1.2.6

1 file

1.2.5

1 file

1.2.4

1 file

1.2.3

1 file

1.2.2

1 file

1.2.1

1 file

1.2.0

1 file

1.1.0

1 file

1.0.1

1 file

1.0.0

1 file

0.11.0

1 file

0.10.0

1 file

0.9.0

1 file

0.8.1

1 file

0.8.0

1 file

0.7.1

1 file

0.7.0

1 file

0.6.7

1 file

0.6.6

1 file

0.6.5

1 file

0.6.4

1 file

0.6.3

1 file

0.6.2

1 file

0.6.1

1 file

0.6.0

1 file

0.5.1

1 file

0.5.0

1 file

0.4.0

1 file

0.3.0

1 file

0.2.1

2 files

0.2.0

2 files

This release

0.1.0 This release

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page