DEV Community

Cover image for Scraping Instagram reels with instascrape
Chris Greening
Chris Greening

Posted on • Updated on

Scraping Instagram reels with instascrape

from instascrape import Reel
Enter fullscreen mode Exit fullscreen mode

In this blog post, I'm going to show you how to scrape Instagram reels using the Python library instascrape's latest feature!

Chris Greening - Software Developer

Hey! My name's Chris Greening and I'm a software developer from the New York metro area with a diverse range of engineering experience - beam me a message and let's build something great!

favicon christophergreening.com

Introducing the Reel scraper

With the release of v1.5.0, instascrape now provides the Reel object for scraping Instagram reel's in just a few lines of code:

from instascrape import Reel 
google_reel = Reel('https://www.instagram.com/reel/CIrJSrFFHM_/')
google_reel.scrape()
print(f"This reel has {google_reel.video_view_count:,} views.")
>>> This reel has 48,593 views.
Enter fullscreen mode Exit fullscreen mode

And that's it! Reel is a subclass of the Post scraper so all expected behaviors and methods carry down for easy usage.

Additional instascrape content

If you're interested in seeing some more instascrape content, check out some of my other blog posts

and drop by the official repo and introduce yourself!

GitHub logo chris-greening / instascrape

Powerful and flexible Instagram scraping library for Python, providing easy-to-use and expressive tools for accessing data programmatically

instascrape: powerful Instagram data scraping toolkit

DISCLAIMER:

Instagram has gotten increasingly strict with scraping and using this library can result in getting flagged for botting AND POSSIBLE DISABLING OF YOUR INSTAGRAM ACCOUNT. This is a research project and I am not responsible for how you use it. Independently, the library is designed to be responsible and respectful and it is up to you to decide what you do with it. I don't claim any responsibility if your Instagram account is affected by how you use this library.

Version Downloads Release License

Activity Dependencies Issues

What is it?

instascrape is a lightweight Python package that provides an expressive and flexible API for scraping Instagram data. It is geared towards being a high-level building block on the data scientist's toolchain and can be seamlessly integrated and extended with industry standard tools for web scraping, data science, and analysis.

Key features

Here are a few of the things that…


Chris Greening - Software Developer

Hey! My name's Chris Greening and I'm a software developer from the New York metro area with a diverse range of engineering experience - beam me a message and let's build something great!

favicon christophergreening.com

Top comments (3)

Collapse
 
anuragsinghal13 profile image
Anurag Singhal

Is there a way I can get the same data using a profile link ?

Collapse
 
alexa_bruges profile image
Alexandra Brugés

I'm not interested in downloading the reel, is there a way to fetch only the data of all the reels of certain date?

thanks

Collapse
 
arihantbarjatya profile image
ArihantBarjatya

is there a way to find the name of the song/audio the reel has