Python Instagramy Script to Scrape Instagram API Profile Pic and Posts of Users and Save it in PC Full Project For Beginners

Python Instagramy Script to Scrape Instagram API Profile Pic and Posts of Users and Save it in PC Full Project For Beginners

 

Welcome folks today in this blog post we will be scraping instagram blog posts and profile pic and save it to pc using instagramy library in python. All the full source code of the application is given below.

 

 

Get Started

 

 

In order to get started you need to install the following library using the pip command as shown below

 

pip install instagramy

 

After installing this make an app.py file and copy paste the following code

 

app.py

 

 

import os

from instagramy.plugins.download import *

session_id = os.environ.get('SESSION_ID')

download_profile_pic(username='harshad_chopda_rocks', sessionid=session_id, filepath='gautam.png')

download_post(id="ipadpograffiti", sessionid=session_id, filepath='post.mp4')

 

 

Now if you execute the python script by typing the below command

 

python app.py

 

It will scrape both the profile picture and instagram posts  as shown below

See also  Python Tkinter GUI Script to Make Music Mp3 Player Using Pygame,ttkthemes and Mutagen Library Full Tutorial For Beginners

 

 

 

Leave a Reply