Giter Site home page Giter Site logo

instalooter's Introduction

InstaLooter Starme

Not all treasure's silver and gold, mate.

InstaLooter is a program that can download any picture or video associated from an Instagram profile, without any API access. It can be seen as a re-implementation of the now deprecated InstaRaider developed by @akurtovic.

Requirements

BeautifulSoup HTML parsing PyPI BeautifulSoup Source BeautifulSoup License BeautifulSoup
docopt CLI arguments parsing PyPI docopt Source docopt License docopt
progressbar2 Dynamic output in CLI PyPI progressbar2 Source progressbar2 License progressbar2
requests HTTP handling PyPI requests Source requests License requests
six Python 2/3 compatibility PyPI six Source six License six
dateutil Date manipulation PyPI dateutil Source dateutil License dateutil

Usage

InstaLooter comes with its CLI:

$ instaLooter <username> <directory> [options]
$ instaLooter hashtag <hashtag> <directory> [options]

Arguments

  • username
    the username of the instagram account to download pictures and videos from.
  • hashtag
    the hashtag to download pictures and videos from.
  • directory
    the directory to download files into.

Options

  • -n NUM, --num-to-dl NUM

    number of maximum new posts to download (if not specified all posts are downloaded).

  • -m, --add-metadata

    add date and caption metadata to downloaded pictures (requires piexif and PIL/Pillow)

  • -v, --get-videos

    also download videos.

  • -j JOBS, --jobs JOBS

    the number of parallel threads to use to download files. It is advised to use a value of at least 12 as Instagram profile pages display 12 medias at a time in order to insure parallel download of all files. [default: 16]

  • -c CRED, --credentials CRED

    the login and password to use to login to Instagram, if needed (for instance: downloading medias from a private account you follow). [format: login[:password]]

  • -q, --quiet

    do not produce any output.

  • -N, --new

    stop the iteration through Instagram pages when a media on the page is found in the destination directory. This makes it faster when InstaLooter is used to maintain a local copy of an Instagram account and allows only getting the newest pictures/videos without re-checking the oldest.

  • -t TIME, --time TIME

    the timeframe within which to download pictures and videos [format: start:stop]. The parameter can be either a combination of start and stop date in ISO format (e.g. 2016-12-21:2016-12-18, 2015-03-07:, :2016-08-02) or a special value among: thisday, thisweek, thismonth, thisyear. Edges are included in the time frame, so if using the following value: --time 2016-05-10:2016-04-03, then all medias will be downloaded including the ones posted on the 10th of May 2016 and on the 3rd of April 2016.

  • -T TMPL, --template TMPL

    A filename template to use to write the files. [default: {id}] The default filename of the pictures and videos on Instagram doesn't show anything about the file you just downloaded. But using the -t argument allows you to give instaLooter a filename template, using the following format with brackets-enclosed ({}) variable names among:

    • id* and code* of the instagram id of the media
    • ownerid*, username and fullname of the owner
    • datetime*: the date and time of the post (YYYY-MM-DD hh:mm:ss)
    • date*: the date of the post (YYYY-MM-DD)
    • width* and height*
    • likescount* and commentscount*

    *: use these only to quicken download, since fetching the others may take a tad longer (in particular in hashtag download mode).

    You are however to make sure that the generated filename is unique, so you should use at least id, code or datetime somewhere. Examples of acceptable values:

    • {username}.{datetime}
    • {username}-{likescount}-{width}x{height}.{id}
    • {username}.{datetime}.something_constant

Installation

From PyPI

$ pip install instaLooter  # requires super-user rights

From GitHub

$ git clone https://github.com/althonos/InstaLooter
$ cd InstaLooter
$ pip install .            # requires super-user rights

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.