/instascraper_py

Instagram image and caption scraper using Python

Primary LanguagePython

InstagramPy

Instagram Image and Caption Downlaoder.

Getting Started

Clone the project by running: git clone https://github.com/rohitpotato/instascraper_py.git

Prerequisites

You must have Python 2.7+ or equivalent installed on your machine.

Python 3 users might have to change some things around.

For example:

Change print "something" to print("something")

Change username = raw_input() to -----> username = input()

Running this projcet

Navigate to the directory where you cloned the project.

There are 2 versions of this application both included in this repo.

First version involves hardcoding your credentials in the main file.

The second version allows you to specify your credentials at the command line, making it dynamic.

For the first version:

You need to add your credentials in the class constructor.

Example

class App:
	def __init__(self, username = 'obiwan', password = 'hellothere', target_username = 'skywalker', path = 'users/rohit/desktop/instapics'):
 

Run:

python insta.py

Libraries Used

BeautifulSoup
Selenium
Chrome Webdriver
Requests

Setting these up is fairly straight forward using pip.

Note:

Since Instagram changes around its structure, the application might stop working. For Handling that, try except blocks have been used to identify the cause of error.

Happy Scraping!