scrapes medias, likes, followers, tags and all metadata. Inspired by instagram-php-scraper,bot

Overview

instagram_scraper

This is a minimalistic Instagram scraper written in Python.

It can fetch media, accounts, videos, comments etc. `Comment` and `Like` actions are also supported.

It is not easy to get Applications approved for Instagram's API therefore I created this tool inspired by instagram-php-scraper.

The goal of this project is to become as minimalistic as possible while still having all the needed functionality so that its easy to add code to it!

Any โญ๏ธ or contribution is appreciated if you like the project ๐Ÿค˜

How to install

Simply run:

pip install igramscraper

or download the project via git clone and run the following:

pip install -r requirements.txt

Usages

Some methods do require authentication:

from igramscraper.instagram import Instagram

instagram = Instagram()

# authentication supported
instagram.with_credentials('username', 'password')
instagram.login()

#Getting an account by id
account = instagram.get_account_by_id(3)

# Available fields
print('Account info:')
print('Id: ', account.identifier)
print('Username: ', account.username)
print('Full name: ', account.full_name)
print('Biography: ', account.biography)
print('Profile pic url: ', account.get_profile_picture_url())
print('External Url: ', account.external_url)
print('Number of published posts: ', account.media_count)
print('Number of followers: ', account.followed_by_count)
print('Number of follows: ', account.follows_count)
print('Is private: ', account.is_private)
print('Is verified: ', account.is_verified)

# or simply for printing use 
print(account)

If you use authentication, the program will cache the user session by default so one doesn't need to create session every time.
If one want to disable the user session cache, assign True to Instagram.login() method

Two Factor Authentication is also supported through cli interface, simply use 'True' for second argument of login() function

Many of the methods do not require authentication

for more info browse through the examples folder

Using proxy for requests:

from igramscraper.instagram import Instagram 

proxies = {
    'http': 'http://123.45.67.8:1087',
    'https': 'http://123.45.67.8:1087',
}

instagram = Instagram()
instagram.set_proxies(proxies)

account = instagram.get_account('kevin')
print(account.identifier)

Recommended Limits

If you make too many requests too fast you will get a 429 Error or something similar.

  • It is recommended to make a short break between each request of 30s (+- random)
  • In between all 10 requests a long break (300-600s)

If different proxies and accounts are used for all requests and the circle doesn't repeat too fast these limits don't apply ;)

Feel free to make your own tests and let us know of any limits you experienced

More usages

See examples here.

How to contribute

Every contribution is welcome, check out our TODOs
and join our telegram group: https://t.me/joinchat/J86yTBAtZlEi-6T6LOxijw

Other

instagram-php-scraper here

Owner
sirjoe
sirjoe
The Python SDK for the BattleshAPI game

BattleshAPy The Python SDK for the BattleshAPI game Installation This library will be eventually going on PyPI, but until then, simply clone or downlo

Christopher 0 Apr 18, 2022
A simple healthcheck wrapper to monitor Kafka.

kafka-healthcheck A simple healthcheck wrapper to monitor Kafka. Kafka Healthcheck is a simple server that provides a singular API endpoint to determi

Rodrigo Nicolas Garcia 3 Oct 17, 2022
Fetch fund data from avanza.se using Python and some web scraping with bs4

Py(A)vanza Fetch fund data from avanza.se using Python and some web scraping with bs4. The default way is to display the data in the terminal, apply -

dunderrrrrr 1 Jan 27, 2022
A Python wrapper for the DeepL API

deepl.py A Python wrapper for the DeepL API installing Install and update using pip: pip install deepl.py A simple example. # Sync Sample import deep

grarich 18 Dec 12, 2022
Skyscanner Python SDK

Skyscanner Python SDK Important As of May 1st, 2020, the project is deprecated and no longer maintained. The latest update in v1.1.5 includes changing

Skyscanner 118 Sep 23, 2022
StringSessionGenerator - A Telegram bot to generate pyrogram and telethon string session

โญ๏ธ String Session Generator โญ๏ธ Genrate String Session Using this bot. Made by TeamUltronX ๐Ÿ”ฅ String Session Demo Bot: Environment Variables Mandatory

TheUltronX 1 Dec 31, 2021
Automatically Edits Videos and Uploads to Tiktok with 1 line of code.

TiktokAutoUploader - Open to code contributions Automatically Edits Videos and Uploads to Tiktok with 1 line of code. Setup pip install -r requirement

Michael Peres 199 Dec 27, 2022
Parse 11.000 free proxies!

Proxy Machine Description I did this project in order to boost views with the teleboost โœˆ๏ธ in my Telegram channel. You can use it not only for boostin

VLDSLV 77 Jan 08, 2023
Proxy-Bot - Python proxy bot for telegram

Proxy-Bot ๐Ÿค– Proxy bot between the main chat and a newcomer, allows all particip

Anton Shumakov 3 Apr 01, 2022
๐Ÿ™ Share your Github stats for 2020 on Twitter

Year on Github ๐Ÿ™ Share your Github stats for 2020 on Twitter. This project contains a small web app that let's you share stats about your Github acti

Johannes Rieke 129 Dec 25, 2022
Modular Telegram bot running on Python

Modular Telegram bot running on Python

Jefanya Efandchris 1 Dec 26, 2021
A Twitter bot developed in Python using the Tweepy library and hosted in AWS.

Twitter Cameroon: @atangana_aron A Twitter bot developed in Python using the Tweepy library and hosted in AWS. https://twitter.com/atangana_aron Cost

1 Jan 30, 2022
EpikCord.py - This is an API Wrapper for Discord's API for Python

EpikCord.py - This is an API Wrapper for Discord's API for Python! We've decided not to fork discord.py and start completely from scratch for a new, better structuring system!

EpikHost 28 Oct 10, 2022
This is Pdisk Upload Bot made using Python with Pyrogram Framework. Its capable of uploading direct download link with thumbnail or without thumbnail & with Title Support.

Pdisk-Upload-Bot Introduction This Is PDisk Upload Bot Used To Upload Direct Link To Pdisk With Thumb Support Deploy Heroku Deploy Local Deploy pip in

HEIMAN PICTURES 32 Oct 21, 2022
This is a walkthrough about understanding the #BoF machine present in the #OSCP exam.

Buffer Overflow methodology Introduction These are 7 simple python scripts and a methodology to ease (not automate !) the exploitation. Each script ta

3isenHeiM 53 Dec 08, 2022
SQS + Lambda๋ฅผ ํ™œ์šฉํ•œ ๋ฌธ์ž ๋ฉ”์‹œ์ง€ ๋ฐ ์ด๋ฉ”์ผ, Voice call ํ˜ธ์ถœ์„ ๊ฐ„๋‹จํ•˜๊ฒŒ ๊ตฌํ˜„ํ•˜๋Š” serverless ํ…œํ”Œ๋ฆฟ

AWS SQS With Lambda notification ์„œ๋ฒ„ ๊ตฌ์ถ•์„ ์œ„ํ•œ Poc TODO serverless๋ฅผ ํ†ตํ•ด sqs ๊ด€๋ จ ๋ฆฌ์†Œ์Šค(๋žŒ๋‹ค, sqs) ๋ฐฐํฌ ๊ฐ€๋Šฅํ•œ ํ…œํ”Œ๋ฆฟ ์ž‘์„ฑ ๋ฐ ๋ฐฐํฌ poc์ฐจ์›์—์„œ ๊ฐ„๋‹จํ•œ rest api ํ˜ธ์ถœ์„ ํ†ตํ•œ sqs fifo ํ์— ๋ฉ”์‹œ์ง€

๊น€์„ธํ™˜ 4 Aug 08, 2021
PS4RemotePKGSender - Use with Remote PKG Installer

PS4_Remote_PKG_Sender Used with the remote PKG installer on PS4 Thanks to the au

Teri 4 Sep 23, 2022
Sends messages to a Discord webhook whenever you make a new commit to your local git repository.

Git-Notif Sends messages to a Discord webhook whenever you make a new commit to your local git repository. Usage Just drop notifier.py into your git h

1 May 29, 2022
A telegram mirror bot with an integrated RSS feed reader.

About What is this repo? This is a slightly modified fork which includes some extra features & memes added to my liking. How's this different from the

11 May 15, 2022
Python Discord Server Nuker

Untitled Nuker Python Discord Server Nuker Features: Ban Everyone Kick Everyone Rename Everyone Spam To All Channels Delete All Channels Delete All Ro

22 Dec 22, 2022