Ver Fonte

Bump version to 3.0.0

Cammy há 6 anos atrás
pai
commit
cc19a72ae4
5 ficheiros alterados com 88 adições e 102 exclusões
  1. 22 25
      .github/issue_template.md
  2. 4 10
      FAQ.md
  3. 27 30
      MOREHELP.md
  4. 34 36
      README.md
  5. 1 1
      setup.py

+ 22 - 25
.github/issue_template.md

@@ -1,7 +1,7 @@
 ### Please check the boxes below by filling [ ] with an x so it looks like [x].
 ###### Remove all spaces already present in the box.
 
-- [ ] I am using the latest version of PyInstaLive: 2.6.0.
+- [ ] I am using the latest version of PyInstaLive: 3.0.0.
 - [ ] I have installed either Python 2.7.x or 3.5>=. (If applicable)
 - [ ] I have read the [README](https://github.com/notcammy/pyinstalive/blob/master/README.md).
 - [ ] I have read the [FAQ](https://github.com/notcammy/pyinstalive/blob/master/FAQ.md).
@@ -15,10 +15,6 @@ I am using:
 - [ ] Linux (distribution: )
 - [ ] macOS (version: )
 - [ ] Other (device & OS name: )
-
-- [ ] I am using the executable **pyinstalive.exe** which I downloaded from [this](https://github.com/notcammy/PyInstaLive/releases) page and I have installed the [update](https://support.microsoft.com/en-gb/help/2999226/update-for-universal-c-runtime-in-windows) needed to use it.
-
-##
 ##
 
 ### To report a bug, fill in the information below.
@@ -29,35 +25,37 @@ Run ```pyinstalive --info``` and paste its output below. Don't forget to omit yo
 **Example:**
 ```bash
 $ pyinstalive --info
-----------------------------------------------------------------------
-PYINSTALIVE (SCRIPT V2.6.0 - PYTHON V3.6.3) - 11:50:00 AM
-----------------------------------------------------------------------
+---------------------------------------------------------------------------
+[I] PYINSTALIVE (SCRIPT V3.0.0 - PYTHON V3.6.3) - 01-02-2019 07:00:17 PM
+---------------------------------------------------------------------------
 [I] To see all the available arguments, use the -h argument.
 
-[I] PyInstaLive version:        2.5.9
+[I] PyInstaLive version:        3.0.0
 [I] Python version:             3.6.3
 [I] FFmpeg framework:           Available
-[I] Cookie files:               2 (username.json matches config user)
+[I] Cookie files:               2 (johndoe.json matches config user)
 [I] CLI supports color:         Yes
-[I] File to run at start:       None
-[I] File to run at finish:      None
-
-[I] Config file:
+[I] Command to run at start:    None
+[I] Command to run at finish:   None
+[I] Config file contents:
 
     [pyinstalive]
-    username = johndoe
-    password = grapefruits
-    save_path = C:\path\to\downloads\
-    show_cookie_expiry = true
-    clear_temp_files = false
-    save_replays = true
+    username = *removed*
+    password = *removed*
+    download_path = \path\to\downloads
+    download_lives = True
+    download_replays = True
+    download_comments = True
+    show_cookie_expiry = False
+    ffmpeg_path =
+    log_to_file = True
     run_at_start =
     run_at_finish =
-    save_comments = true
-    log_to_file = false
+    use_locks = True
+    clear_temp_files = False
 
 [I] End of PyInstaLive information screen.
-----------------------------------------------------------------------
+---------------------------------------------------------------------------
 ```
 
 ###### Command used
@@ -71,10 +69,9 @@ Accurately describe the issue you're experiencing with the script.
 ###### Steps to reproduce issue
 Specify the exact steps taken to reproduce the problem. If you can't reproduce the issue try to describe the steps you've taken that eventually resulted in the issue you have experienced.
 
-##
 ##
 
 ### To ask a question, fill in the information below.
 
 ###### Question
-Describe your question here as clear as possible.
+Describe your question here as clear as possible.

+ 4 - 10
FAQ.md

@@ -4,25 +4,19 @@
 ### I'm unable to log in, what do I do?
 Login errors such as `Challenge required` are usually caused by one of the following:
 
-- You are using PyInstaLive from a different location, device or IP address compared to where you are usually logged in. (This means  things like your phone's 4G network vs your home's internet connection)
+- You are using PyInstaLive from a different location, device or IP address compared to where you are usually logged in.
 - Your IP address or account has been flagged as spam or suspicious.
 
-The reasons above are things I have no control over, so there's no direct way for me to solve your problem. You can try checking out the URL which you can find in the response text you'll be able to see when such errors occur:
-```
-(Code: 400, Response: {"message": "challenge_required", "challenge": {"url": "https://i.instagram.com/challenge/XXXXX/XXXX/", "api_path": "/challenge/XXXXX/XXXXXX/", "lock": true, "logout": false, "native_flow": true}, "status": "fail", "error_type": "checkpoint_challenge_required"})
-```
-
-If that doesn't help you out either, create a new temporary Instagram account (on the device and internet connection you will be using PyInstaLive with) and use that instead.
+Try to create a new temporary Instagram account (preferably on the device most importantly using the internet connection you will be using PyInstaLive with) and use that instead.
 
 ### I get a Rate Limit related error, how do I solve this?
 This means you are making too many requests to Instagram and is usually the case when you try to check and download livestreams of multiple users at the same time by using a script (as seen below). Increase the timeout for the scripts or decrease the amount of users you are checking.
 
-
 ### How do I download livestreams of multiple users at the same time?
 
 #### Option 1 - Checking your following users
 
-You can use the `--downloadfollowing` function to check for available livestreams and replays from your following user list. Read the [Help Documents](https://github.com/notcammy/PyInstaLive/blob/master/MOREHELP.md) for more information.
+You can use the `--download-following` function to check for available livestreams and replays from your following user list. Read the [Help Documents](https://github.com/notcammy/PyInstaLive/blob/master/MOREHELP.md) for more information.
 
 #### Option 2 - Using external scripts
 ##### Note: Continuously checking for livestreams with an external script is considered suspicious behaviour by Instagram. Use a timeout as large as possible to decrease the chances of your account, device or IP from getting flagged as suspicious and getting blocked as a result of that. Use the scripts below at your own risk.
@@ -63,5 +57,5 @@ Use the scripts provided in the previous question, they'll infinitely run the Py
 
 ### Can I use PyInstaLive and [livestream_dl](https://github.com/taengstagram/instagram-livestream-downloader) concurrently?
 
-No. This is because livestream_dl is no longer being maintained and as such uses an older version of libraries required by PyInstaLive. Installing PyInstaLive and livestream_dl on different Python versions (2/3) might work though.
+No. This is because livestream_dl is no longer being maintained and as such uses an older version of libraries required by PyInstaLive. Installing PyInstaLive and livestream_dl on different Python versions (2/3) will probably work though.
 

+ 27 - 30
MOREHELP.md

@@ -1,7 +1,7 @@
 # Commands
 
 
-- ```-h``` or ```--help```  **—**  When this argument is passed, PyInstaLive's help message will be shown containing all available commands.
+- ```-h``` or ```--help```  **—**  PyInstaLive's help message will be shown containing all available commands.
 
 - ```-u``` or ```--username```  **—**  Instagram username to login with. Requires:  ```--password```, ```--download```.
 
@@ -9,21 +9,19 @@
 
 - ```-d``` or ```--download```  **—**  The username or user Id of the user whose livestream or replay you want to save.
 
-- ```-r``` or ```--record```  **—**  The username of the user whose livestream or replay you want to save (legacy).
+- ```-i``` or ```--info```  **—**  PyInstaLive will show information such as its current version, the configuration file contents, available cookie files and other relevant information.
 
-- ```-i``` or ```--info```  **—**  When this argument is passed, PyInstaLive will show information such as its current version, the configuration file contents, available cookie files and more.
+- ```-nr``` or ```--no-replays```  **—**  PyInstaLive will not download any available replays. Overrides the configuration file value.
 
-- ```-nr``` or ```--noreplays```  **—**  When this argument is passed, PyInstaLive will not download any available replays. Overrides the configuration file.
+- ```-nl``` or ```--no-lives```  **—**  PyInstaLive will not download livestreams. Overrides the configuration file value.
 
-- ```-nl``` or ```--nolives```  **—**  When this argument is passed, PyInstaLive will not download livestreams. Overrides the configuration file.
+- ```-cl``` or ```--clean```  **—**  PyInstaLive clean the current download folder by deleting folders ending in `_downloads`. Any folders that contain a `folder.lock` file (e.g. folders for ongoing downloads) will be skipped.
 
-- ```-cl``` or ```--clean```  **—**  When this argument is passed, PyInstaLive clean the current download folder by deleting folders ending in `_downloads`. Any folders that contain a `folder.lock` file (e.g. folders for ongoing downloads) will be skipped.
+- ```-df``` or ```--download-following```  **—**  PyInstaLive will check if any users from your following list have any available livestreams or replays and start a daemon process running PyInstaLive in the background for those that do. You cannot cancel the launched processes or start them with any extra arguments. It's recommended to enable ```log_to_file``` when using this argument. (Experimental, use at own risk.)
 
-- ```-df``` or ```--downloadfollowing```  **—**  When this argument is passed, PyInstaLive will check if any users from your following list have any available livestreams or replays and start a daemon process running PyInstaLive in the background for those that do. You cannot cancel the launched processes or start them with any extra arguments. It's recommended to enable ```log_to_file``` when using this argument. (Experimental, use at own risk.)
+- ```-cp``` or ```--config-path```  **—**  Passing this argument along with a valid path to a different configuration file will override the default path.
 
-- ```-cp``` or ```--configpath```  **—**  Passing this argument along with a valid path to a different configuration file will override the default path.
-
-- ```-sp``` or ```--saavepath```  **—**  Passing this argument along with a valid path to a different folder will override the path specified in the configuration file.
+- ```-dp``` or ```--download-path```  **—**  Passing this argument along with a valid path to a different folder will override the path specified in the configuration file.
 
 
 
@@ -33,42 +31,41 @@
 [pyinstalive]
 username = johndoe
 password = grapefruits
-save_path = 
+download_path = 
+download_lives = True
+download_replays = True
+download_comments = true
+show_cookie_expiry = True
+log_to_file = True
 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
+use_locks = True
+clear_temp_files = False
 ```
 
 ```username```  **—**  Instagram username to login with.
 
 ```password```  **—**  Instagram password to login with.
 
-```save_path```  **—**  Path to the folder where downloaded Instagram livestreams and replays will be saved. PyInstaLive must have permission to write files to this folder. If left empty, PyInstaLive will attempt to fall back to the folder where it's being run from.
+```download_path```  **—**  Path to the folder where downloaded Instagram livestreams and replays will be saved. PyInstaLive must have permission to write files to this folder. If left empty, PyInstaLive will attempt to fall back to the folder where it's being run from.
 
-```ffmpeg_path```  **—**  User-defined path to the FFmpeg binary. If left empty, PyInstaLive will fall back to the system's environment variable.
+```download_lives```  **—**  When set to True, PyInstaLive will download livestreams.
 
+```download_replays```  **—**  When set to True, PyInstaLive will download any available replays.
 
-```show_cookie_expiry```  **—**  When set to True, PyInstaLive will show when the current cookie used to login will expire.
+```download_comments```  **—**  When set to true, PyInstaLive will try to download comments from a livestream or replay to a log file. Verified users have *(v)* next to their name.
 
-```clear_temp_files```  **—**  When set to True, PyInstaLive will delete all temporary files that were downloaded as well as the folders which contained these files. Replay folders created by PyInstaLive will not be deleted because they are used to determine if a replay has already been downloaded.
+```show_cookie_expiry```  **—**  When set to True, PyInstaLive will show when the current cookie used to login will expire.
 
-```save_lives```  **—**  When set to True, PyInstaLive will download livestreams.
+```log_to_file```  **—**  When set to true, PyInstaLive will save all its console logs to a text file. The filename will be `pyinstalive_<live-username>.log` where `<live_username>` will be the username of the Instagram user whose livestream or replay you want to download. If no username was given to download (e.g when running `pyinstalive --clean`) the file will be named `pyinstalive.default.log`.
 
-```save_replays```  **—**  When set to True, PyInstaLive will download any available replays.
+```ffmpeg_path```  **—**  User-defined path to the FFmpeg binary. If left empty, PyInstaLive will fall back to the system's environment variable.
 
-```run_at_start```  **—**  Command to run when PyInstaLive starts downloading a livestream. Leave empty to disable. (Experimental, use at own risk.)
+```run_at_start```  **—**  Command to run when PyInstaLive starts downloading a livestream. Leave empty to disable. (Experimental feature)
 
-```run_at_finish```  **—**  Command to run when PyInstaLive finishes downloading a livestream. Leave empty to disable. (Experimental, use at own risk.) 
- 
-```save_comments```  **—**  When set to true, PyInstaLive will try to save comments from a livestream or replay to a log file. Verified users have *(v)* next to their name. (Experimental, use at own risk.)
+```run_at_finish```  **—**  Command to run when PyInstaLive finishes downloading a livestream. Leave empty to disable. (Experimental feature) 
 
-```log_to_file```  **—**  When set to true, PyInstaLive will save all its console logs to a text file. The filename will be `pyinstalive_<live-username>.log` where `<live_username>` will be the username of the Instagram user whose livestream or replay you want to download. If no username was given to download (e.g when running `pyinstalive --clean`) the file will be named `pyinstalive.default.log`.
+```clear_temp_files```  **—**  When set to True, PyInstaLive will delete all temporary files that were downloaded as well as the folders which contained these files. Replay folders created by PyInstaLive will not be deleted because they are used to determine if a replay has already been downloaded.
 
-```use_locks```  **—**  When set to true, PyInstaLive will create several .lock files to prevent duplicate downloads from starting for the same user if you are running PyInstaLive using some form of automation such as batch/shell loops.
+```save_comments```  **—**  When set to true, PyInstaLive will create several .lock files to prevent duplicate downloads from starting for the same user if you are running PyInstaLive using some form of automation such as batch/shell loops.

+ 34 - 36
README.md

@@ -1,5 +1,5 @@
 # PyInstaLive
-![Version ](https://img.shields.io/badge/Version-2.6.0-orange.svg?longCache=true&style=flat)
+![Version ](https://img.shields.io/badge/Version-3.0.0-orange.svg?longCache=true&style=flat)
 
 This Python script enables you to download any ongoing Instagram livestreams as well as any available replays. It is based on [another script](https://github.com/taengstagram/instagram-livestream-downloader) that has now been discontinued.
 
@@ -11,12 +11,11 @@ This Python script enables you to download any ongoing Instagram livestreams as
 - [Notes](https://github.com/notcammy/PyInstaLive#notes)
 - [Help](https://github.com/notcammy/PyInstaLive#help)
 
-## Features
+## Main Features
 
 - Download ongoing livestreams (also detects livestreams in which the user is a guest of someone else's livestream)
 - Download available replays
 - Download livestream and replay comments
-- Run a command when starting and/or finishing a download (Experimental)
 
 ![](https://raw.githubusercontent.com/notcammy/PyInstaLive/5907fc866446d5f426389a5198560075848d770e/.github/spacer.png)
 
@@ -24,7 +23,7 @@ This Python script enables you to download any ongoing Instagram livestreams as
 
 - [Read the Notes & Help sections below (important!)](https://github.com/notcammy/PyInstaLive#notes)
 - Install the prerequisites and then PyInstaLive.
-- Run `pyinstalive -c` to generate a configuration file.
+- 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.
 
@@ -57,15 +56,15 @@ In case it doesn't work or you just prefer building PyInstaLive from source foll
 
 Run the following command in Command Prompt (might need to be run as administrator on Windows) or a terminal:
 ```bash
-pip install git+https://github.com/notcammy/PyInstaLive.git@2.6.0 --process-dependency-links
+pip install git+https://github.com/notcammy/PyInstaLive.git@3.0.0 --process-dependency-links
 ```
 
 #### Updating
 
-To update PyInstaLive to the latest version (currently **2.6.0**) run the following command:
+To update PyInstaLive to the latest version (currently **3.0.0**) run the following command:
 
 ```bash
-pip install git+https://github.com/notcammy/PyInstaLive.git@2.6.0 --process-dependency-links --upgrade
+pip install git+https://github.com/notcammy/PyInstaLive.git@3.0.0 --process-dependency-links --upgrade
 ```
 
 #### Specific versions
@@ -119,37 +118,36 @@ Below is an example of PyInstaLive's output after downloading a livestream:
 ```
 > pyinstalive -d "janedoe"
 
-----------------------------------------------------------------------
-PYINSTALIVE (SCRIPT V2.6.0 - PYTHON V3.6.3) - 06:45:30 PM
-----------------------------------------------------------------------
-[I] Successfully logged into user "johndoe".
-[I] Cookie file expiry date: 2018-09-01 at 04:38:08 PM
-----------------------------------------------------------------------
-[I] Getting info for "janedoe" successful.
-----------------------------------------------------------------------
-[I] Checking for livestreams and replays...
-----------------------------------------------------------------------
-[I] Livestream found, beginning download...
-----------------------------------------------------------------------
+---------------------------------------------------------------------------
+[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     : 100 watching
-[I] Airing time : 2 minutes And 10 seconds
+[I] Viewers     : 335 watching
+[I] Airing time : 2 minutes and 8 seconds
 [I] Status      : Active
-[I] MPD URL     : https://scontent-amt2-1.cdninstagram.com/hvideo-prn1/v/rID1yGvO_UPlsukIhbhOx/live-dash/dash-hd/17907800311113848.mpd?_nc_rl=AfBVd51QpQOj_ImC&oh=aa8d53b4fd736c0edc29c97b411bd32b&oe=5A6FDE8B
-----------------------------------------------------------------------
-[I] Downloading livestream... press [CTRL+C] to abort.
-----------------------------------------------------------------------
-[I] The livestream has ended.
-[I] Download duration : 13 minutes and 10 seconds
-[I] Stream duration   : 15 minutes and 20 seconds
-[I] Missing (approx.) : 2 minutes and 10 seconds
-----------------------------------------------------------------------
-[I] Stopping comment downloading and saving comments (if any)...
-[I] Successfully saved 550 comments to logfile.
-----------------------------------------------------------------------
-[I] Stitching downloaded files into video...
-[I] Successfully stitched downloaded files into video.
-----------------------------------------------------------------------
+---------------------------------------------------------------------------
+[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.
+---------------------------------------------------------------------------
 ```
 
 ![](https://raw.githubusercontent.com/notcammy/PyInstaLive/5907fc866446d5f426389a5198560075848d770e/.github/spacer.png)

+ 1 - 1
setup.py

@@ -2,7 +2,7 @@ from setuptools import setup
 
 __author__ = 'notcammy'
 __email__ = 'neus2benen@gmail.com'
-__version__ = '2.6.0'
+__version__ = '3.0.0'
 
 _api_version = '1.5.7'
 _api_extensions_version = '0.3.8'