ScrapInsta

A script to scraping data from Instagram

Install

First of all you can run:

pip install scrapinsta

After that you need to install these requirements:

You can install one-by-one:

selenium

pip install selenium

webdriver_manager

pip install webdriver_manager

cryptography

pip install cryptography

Or install by requirements.txt

pip install -r requirements.txt

Scraping user followers

Usage

  1. from scrapinsta import Scrapinsta and instantiate
  2. Call function Scrapinsta.get_user_follower(account, amount, method, print_followers)

account: Account which want to get user followers
amount: Number of followers to scraping
method: By default is 'list'(returns a list), but can be 'txt' this will write a .txt with user followers
print_followers: By default is 'false'(don't print followers), but can be 'true' this will print followers

Example code:

    from scrapinsta import Scrapinsta
    account = 'nasa' # Account to get info
    amount = 50 
    # Instantiate Scrapinsta
    s = Scrapinsta()
    # Testing: method = 'list'
    list_followers = s.get_user_followers(account, amount, method='list', print_followers='true')
    # Testing: method = 'txt'
    s.get_user_followers(account, amount, method='txt', print_followers='true')

Scraping user following account

Usage

  1. from scrapinsta import Scrapinsta and instantiate
  2. Call function Scrapinsta.get_user_followings(account, amount, method, print_following)

account: Account which wants to get followed users
amount: Number of followed users to scraping
method: By default is 'list'(returns a list), but can be 'txt' this will write a .txt with followed users
print_following: By default is 'false'(don't print followed users), but can be 'true', this will print followed users

Example code:

    from scrapinsta import Scrapinsta
    account = 'nasa' # Account to get info
    amount = 50 
    # Instantiate Scrapinsta
    s = Scrapinsta()
    # Testing: method = 'list'
    list_following = s.get_user_followings(account, amount, method='list', print_following='true')
    # Testing: method = 'txt'
    s.get_user_followings(account, amount, method='txt', print_following='true')

GitHub

GitHub - matheuskolln/scrapinsta: Scraping followers of an instagram account
Scraping followers of an instagram account. Contribute to matheuskolln/scrapinsta development by creating an account on GitHub.