Python script to download Instagram livestreams and replays.

Cammy c254948ac8 Properly exit assemble function if no segments are found in folder 6 tahun lalu
.github cc19a72ae4 Bump version to 3.0.0 6 tahun lalu
pyinstalive c254948ac8 Properly exit assemble function if no segments are found in folder 6 tahun lalu
.gitignore dbb0801d8a Update .gitignore 6 tahun lalu
FAQ.md cc19a72ae4 Bump version to 3.0.0 6 tahun lalu
LICENSE 86d3a0107e Create LICENSE 7 tahun lalu
MOREHELP.md cc19a72ae4 Bump version to 3.0.0 6 tahun lalu
README.md e42444372d Readme improvements 6 tahun lalu
setup.py cc19a72ae4 Bump version to 3.0.0 6 tahun lalu

README.md

PyInstaLive

Version 3.0.0 Python 2.7, 3.5

This Python script enables you to download any ongoing Instagram livestreams as well as any available replays. It is based on another script that has now been discontinued.

Table of Contents

Main Features

PyInstaLive is capable of downloading:

  • Ongoing livestreams (also detects livestreams where the specified user is being guested).
  • Saved replays.
  • Livestream and replay comments.
  • Available livestreams and replays from your following user feed, concurrently.

Quickstart

  • Read the Notes & Help sections below (important!)
  • Install the prerequisites and then PyInstaLive.
  • Run pyinstalive to generate a default configuration file.
  • Edit the configuration file using any text editor.
  • Run pyinstalive -d "<live-username>" to start downloading a livestream or replay.

Prerequisites

Make sure all tools are accessible via command line (added to your PATH if on Windows, use Google).

Installation

If you run Windows you can try out the Windows build available here. In case it doesn't work or you just prefer building PyInstaLive from source follow the instructions below.

Tip — You can easily add the executable to your PATH as well by copying it to the Windows installation folder.

Installing

Run the following command in Command Prompt (might need to be run as administrator on Windows) or a terminal:

pip install git+https://github.com/notcammy/PyInstaLive.git@3.0.0 --process-dependency-links

Updating

To update PyInstaLive to the latest version (currently 3.0.0) run the following command:

pip install git+https://github.com/notcammy/PyInstaLive.git@3.0.0 --process-dependency-links --upgrade

Specific versions

If you want to install a specific version of PyInstaLive when for example the newest version contains a bug, you can specify the version tag in the install command:

pip install git+https://github.com/notcammy/PyInstaLive.git@2.2.0 --process-dependency-links

Use the version number you want after the @ symbol (e.g 2.2.0).

Usage

Make sure there is a configuration file called pyinstalive.ini in the directory you want to run PyInstaLive from.

You can run pyinstalive -c to automatically generate a default configuration file if one is not present.

Here is an example of a valid configuration file:

[pyinstalive]
username = johndoe
password = grapefruits
save_path = 
ffmpeg_path = 
show_cookie_expiry = true
clear_temp_files = false
save_lives = true
save_replays = true
run_at_start =
run_at_finish =
save_comments = false
log_to_file = false
use_locks = true

Example

pyinstalive -u "johndoe" -p "grapefruits" -d "janedoe"

You can omit the username and password arguments if you have specified these in the configuration file:

pyinstalive -d "janedoe"

Below is an example of PyInstaLive's output after downloading a livestream:

> pyinstalive -d "janedoe"

---------------------------------------------------------------------------
[I] PYINSTALIVE (SCRIPT V3.0.0 - PYTHON V3.6.3) - 01-02-2019 06:56:29 PM
---------------------------------------------------------------------------
[I] Successfully logged into account: johndoe
---------------------------------------------------------------------------
[I] Getting info for 'janedoe' successful.
---------------------------------------------------------------------------
[I] Livestream available, starting download.
---------------------------------------------------------------------------
[I] Username    : janedoe
[I] Viewers     : 335 watching
[I] Airing time : 2 minutes and 8 seconds
[I] Status      : Active
---------------------------------------------------------------------------
[I] Downloading livestream, press [CTRL+C] to abort.
---------------------------------------------------------------------------
[I] The livestream has been ended by the user.
---------------------------------------------------------------------------
[I] Airtime duration  : 3 minutes and 13 seconds
[I] Download duration : 1 minutes and 7 seconds
[I] Missing (approx.) : 2 minutes and 6 seconds
---------------------------------------------------------------------------
[I] Waiting for comment downloader to finish.
[I] Successfully saved 19 comments.
---------------------------------------------------------------------------
[I] Merging downloaded files into video.
[I] Successfully merged downloaded files into video.
---------------------------------------------------------------------------
[I] There are no available replays.
---------------------------------------------------------------------------

Notes

  • I have not much time to extensively test the changes I make to the code, so when you do encounter a problem please open an issue and try using an older version of PyInstaLive in the meantime.

  • Python 2 cannot save most unicode characters in comments such as emojis if it's not built from source using the --enable-unicode=ucs4 argument. Read more about this here. This should probably not affect pre-installed Python 2 installations on Linux-based systems such as Ubuntu or Debian.

Help

You can find a list of frequently asked questions here.

You can find a list of available commands and an explanation of the configuration file here.

If you would like to report a bug or ask a question please open an issue.