dvingerh / PyInstaLive

Python script to download Instagram livestreams.
MIT License
547 stars 111 forks source link

macOS SUPPORT?!!?! #125

Closed UnixCro closed 3 years ago

UnixCro commented 3 years ago

Where is the macOS support. Why do you prefer Windows only. There are also macOS people who would like to have a prefabricated binary file and not such a shitty full of python scripts that you can't do anything with. Sorry but why only Windows ?! And no interest in the other operating systems?!?

alscaldas commented 3 years ago

I'm not the developer but I believe that, as stated on the README, this project has been deprecated for almost a year, which means that considering the frequent changes Instagram does it's very possible that it's not working working any more, no matter the SO.

As for the installation itself I'm not a macOS user but have you tried just install Python and Pip using brew and then install PyInstaLive?

UnixCro commented 3 years ago

First of all thanks for your answer. You're right, I should ask a little more politely soon. Do you have any idea because you say that it works for you problem how I can compile it on my Mac. Everything is prepackaged with scripts and no Python script works for me. How do I make it as a working binary file? Many Thanks

dvingerh commented 3 years ago

I'm sorry, I don't have access to an Apple device and no knowledge of creating binaries for them. Creating a binary file of a Python script is notoriously cumbersome and I only made the Windows binary upon request by a different user, which I cannot do anymore either because I lost the configuration files for it.

You don't need to compile anything yourself to use this on macOS (or any OS for that matter), like alscaldas mentioned you can use pip (a package manager) to install PyInstaLive using the commands provided in the README.md. There are several guides online describing how to install and use pip on MacOS.

UnixCro commented 3 years ago

The command in the ReadME file does not work under macOS. But what is possible is this. However, I get error messages

home@hostname ~ % pip3 install pyinstalive

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement pyinstalive (from versions: none)
ERROR: No matching distribution found for pyinstalive
WARNING: You are using pip version 21.2.1; however, version 21.2.3 is available.
You should consider upgrading via the '/Library/Developer/CommandLineTools/usr/bin/python3 -m pip install --upgrade pip' command.

Who tells me how to get it going on this box, I'll donate 5$ in Bitcoin

dvingerh commented 3 years ago

pyinstalive isn't an official package on pypi.org that's why it cannot find it and also why the command in the readme uses git to retrieve this repository's files for pip to install them.

you haven't specified why the command in the readme doesnt work, but you need to ensure you have the prerequisites installed and working. Replace pip with pip3 where applicable

UnixCro commented 3 years ago

It didn't work at first until I used sudo Without more rights the following message came up:

Command "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/xl/jmsdpjrn3wz78g4k5g1fvcs40000gp/T/pip-install-so_QVo/instagram-private-api/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/xl/jmsdpjrn3wz78g4k5g1fvcs40000gp/T/pip-record-Zou3kL/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/xl/jmsdpjrn3wz78g4k5g1fvcs40000gp/T/pip-install-so_QVo/instagram-private-api/

But then it worked immediately:

root@hostname ~ # pyinstalive -h
usage: pyinstalive [-h] [-u USERNAME] [-p PASSWORD] [-d DOWNLOAD]
                   [-b, BATCHFILE] [-i] [-nr] [-nl] [-cl] [-cp CONFIGPATH]
                   [-dp DLPATH] [-as ASSEMBLE] [-gc GENERATECOMMENTS] [-df]
                   [-nhb] [-sm] [-o]

But when I tried to download something from someone without logging in somewhere, the message came up:

root@hostname ~ # pyinstalive -d liveusername
---------------------------------------------------------------------------
[I] PYINSTALIVE (SCRIPT V3.2.4 - PYTHON V2.7.16) - 08-08-2021 12:54:39 PM
---------------------------------------------------------------------------
[W] Unable to find cookie file: johndoe.json
[I] Creating a new one.
---------------------------------------------------------------------------
[E] Could not login: {"status": "fail", "error_title": "Incorrect password for johndoe", "error_type": "bad_password", "buttons": [{"action": "dismiss", "title": "Try Again"}], "message": "The password you entered is incorrect. Please try again.", "invalid_credentials": true}
---------------------------------------------------------------------------

I logged into my account in the hope that it would work to download someone else's livestream

root@hostname ~ # pyinstalive --username myinstausername --password mypassword -d liveusername
---------------------------------------------------------------------------
[I] PYINSTALIVE (SCRIPT V3.2.4 - PYTHON V2.7.16) - 08-08-2021 12:54:54 PM
---------------------------------------------------------------------------
[I] Overriding configuration file login with -u and -p arguments.
---------------------------------------------------------------------------
[I] Successfully logged into account: None
---------------------------------------------------------------------------
[E] Could not get user info for 'liveusername': 'ascii' codec can't encode character u'\xe4' in position 667: ordinal not in range(128)

Small Update

After I upgraded pyinstalive, there was no more error message, just a hint that I was still unable to download a live stream

root@hostname ~ # pyinstalive -d liveusername
PYINSTALIVE DOWNLOADER (SCRIPT v2.2.0)
--------------------------------------------------
usage: pyinstalive [-h] [-u USERNAME] [-p PASSWORD] -r RECORD
pyinstalive: error: argument -r/--record is required
root@hostname ~ # pyinstalive -r -d liveusername

PYINSTALIVE DOWNLOADER (SCRIPT v2.2.0)
--------------------------------------------------
usage: pyinstalive [-h] [-u USERNAME] [-p PASSWORD] -r RECORD
pyinstalive: error: argument -r/--record: expected one argument
dvingerh commented 3 years ago

xe4 is character ä, it probably trips up because account biography text contains that character and i never got around to fixing it since development has ended i would recommend switching to a different python version like 3.8.x

After I upgraded pyinstalive, there was no more error message, just a hint that I was still unable to download a live stream

You already were using the latest version, you just downgraded to a very old one.

UnixCro commented 3 years ago

IT WORKED!!!!

I downloaded his Instagram livestream as a test from someone else, who does not have BIO and it worked without problems. So cool of you. Thanks alot. But I hope you fix the bug with the bio because it's a shame if such a great program doesn't work because of it.

Could you maybe give me your BTC address?

dvingerh commented 3 years ago

No need to donate, but thanks anyway. Like mentioned in the readme development for this script has ended a long time ago so no further updates will be pushed out, I'm sorry.

For this reason I would really recommend switching to Python 3 instead since it should solve most problems with, in this case, character encoding. While Python 2 is supported by PyInstaLive it has reached its end of life last year and should ideally not be used anymore.

UnixCro commented 3 years ago

Alright, I'll do that. I will then no longer use this Python version. I insist on donating money to help develop this project. Unfortunately I don't have a PayPal for "Buy me a Coffee". I ask you to give your BTC address. Many Thanks

dvingerh commented 3 years ago

Thank you, but I don't have a wallet address for BTC at this time. I would rather you use this script for free instead, for as long as it lasts