Skip to content

Python project used to extract information from instagram posts. It doesn't require any instagram account and use the public APIs offered by the website. Avoid heavy load scraping

Notifications You must be signed in to change notification settings

FEDE9326/InstagramScraping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This Python script can be used to scrape https://www.instagram.com/explore/tags/HASHTAG page and for every post it stores:

  1. Content of the picture
  2. Related Hashtags

It is a very interesting tool to discover trending hashtags and relative content. Data are first stored into a csv file and then plotted using matplotlib. Because of scraping policies, I included randomic waiting time between requests to Instagram website.

The python script uses the selenium library to interact with the Selenium WebDriver which is used to automate browser operations. In order to install:

pip install selenium

Selenium requires a driver to interface with the chosen browser. In my case I used Chrome. Chrome driver can be downloaded from https://sites.google.com/a/chromium.org/chromedriver/downloads. The path to this file has to be added to the PATH system variable, in order for Python to be able to locate it while executing. For more information in how installing and setup Selenium WebDriver visit https://pypi.org/project/selenium/.

This is an output example with the hashtag guitar

Hashtags Content

About

Python project used to extract information from instagram posts. It doesn't require any instagram account and use the public APIs offered by the website. Avoid heavy load scraping

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages