Giter Club home page Giter Club logo

igscrapper's Introduction

Scraping Photos and Descriptions from an Instagram account

It can be used to scrape photos from any Instagram account (Offcourse, only if you follow that account or it's an open account) and write the photo description for each photo to excel sheet.

Dependencies

You need Python 3.x on your system to run this program. Also, there are some handful of libraries you need to install beforehand. You can easily install them using python package manager pip.

  • xlsxwriter 1.x
  • requests 2.x
  • BeautifulSoup 4.x
  • lxml 4.x (For parsing the data. Although, you can use any other parser as well.)
  • Selenium 3.x

Also, Browser Driver will be required to control it. I’ve using ChromeDriver for Linux. You can download ChromeDriver at the following page, select the latest release and then download the package dedicated to your operating system (Linux, Mac, or Windows) into your machine: https://sites.google.com/a/chromium.org/chromedriver/downloads.

If you prefer any other browser or are operating on any other OS, then you can use driver exclusive to that browser and to that OS. You can change the path to the driver in instaScraper.py by changing the value of self.driver.

Restrictions

  • Instagram code tends to change from time to time, so you might need to change some of the XPath expressions when you run this code.
  • Turn-off the Two-factor Authentication in your Instagram account.
  • This program won’t download the videos.
  • A good internet connection might actually decrease the program execution time. But if you have slow internet, then you can change the wait time from 10 to whatever suits you in all the lines that match the below code in instaScraper.py file.
WebDriverWait(self.driver,10)
  • You must either follow the target account or it must be an open account.

You can read more about the execution of this program on Darshan Majithiya - medium.

igscrapper's People

Contributors

nqhuy213 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.