Giter Club home page Giter Club logo

instascrape's Introduction

logo

instascrape

A fast and lightweight Instagram media downloader.

demo
Downloading 50 timeline posts and tagged posts (excluding videos) with preload option enabled, within 60 seconds.

github releases pypi project pypi downloads license


instascrape is a fast and lightweight utility and Python library for downloading a massive amount of media (photos and videos) from Instagram, without using the official Instagram Public API.

What makes instascrape special, is that instascrape aims at high efficeiency and speed. It provides a preload option that fetches and loads the full data of every item (Post/Profile) beforehand, using multithreading with the producer-consumer strategy.

Features

  • ๐Ÿ”Œ Powerful & simple-to-use library interface
    • โ›“ calls methods in a chain (fluent interface)
    • ๐Ÿ”ฉ provides hooks/callbacks in download methods
  • ๐Ÿšธ User-friendly commad-line interface
  • ๐Ÿ’จ High efficiency
    • ๐Ÿงต uses multithreading to fetch data
    • โšก๏ธ uses generators to yield results
  • ๐Ÿ”Ž Provides a filter option to avoid downloading media that you don't want
  • ๐Ÿ“‘ Download media along with their metadata
  • โš ๏ธ Good exceptions handling
  • ๐Ÿช Manages multiple cookies for you
  • ๐Ÿ”‘ Peforms authentication effectively
    • ๐Ÿ” supports 2FA
    • ๐Ÿ–‡ solves checkpoint challenge
  • ๐Ÿ•ถ Can be used in anonymous mode

Prerequisites

โ–ธ Please make sure you have Python 3.5+ installed in your machine.

Dependencies

Installation

Lastest PyPI Stable Release (Recommended)

$ pip install instascraper

NOTE: Be careful when installing! The project name on PyPI is instascraper, not instascrape, since the name instascrape has been taken by another project.

Latest GitHub Commit

$ git clone https://github.com/tnychn/instascrape.git
$ cd instascrape
$ python setup.py install

Quickstart

To quickly download 100 timeline posts of Emma Watson (@emmawatson) that have more than 1M likes,

Command-line

$ instascrape down @emmawatson -timeline -PF "likes_count >= 1000000" -l 100 --preload -d ~/Pictures/Instagram

Library

from instascrape import Instascraper

with Instascraper() as insta:
    posts = insta.profile("emmawatson").timeline_posts()
    posts.limit(100).preload(True).filter(lambda p: p.likes_count >= 1000000)
    posts.download_all(dest="/Users/user/Pictures/Instagram")

Disclaimer

This project is in no way authorized, maintained or sponsored by Instagram. Use instascrape responsibly, do not use it for spamming or illegal activities.

We are not responsible for any kinds of negative actions that results from the use of instascrape. This is an independent and unofficial project. Use at your own risk.


~ crafted with โ™ฅ๏ธŽ by tnychn ~
MIT ยฉ 2019 Tony Chan

instascrape's People

Contributors

tnychn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.