KevCui / soaper-dl

:tv: Soaper downloader: download TV series and movies in your terminal
Do What The F*ck You Want To Public License
69 stars 19 forks source link

Chrome error #16

Closed cyragra closed 2 years ago

cyragra commented 2 years ago

Good Morning, I'm trying to use the script but i get chrome errors and i dont know how to install it since im using it on a machine with just command line. Is there any way i can install it without needing a GUI or a way to get it running on windows?

KevCui commented 2 years ago

Hi @cyragra, what kind of error are you facing?

cyragra commented 2 years ago

it says it cannot find google

KevCui commented 2 years ago

ehm... no idea about that error... It appears to be an installation issue, which is not directly related to this repository. I'd suggest to search for the solution online. You may find some guidance which depends on your platform. Good luck!

cyragra commented 2 years ago

yeah... i have tried doing it and the closest ive gotten was getting google-chrome install. but even then while running i still get [ERROR] chrome command not found! is there something that you can direct me to install for this? im running ubuntu 20.04 headless.

KevCui commented 2 years ago

Hey @cyragra, do you know which location the chrome is installed? You could create a symbol link in /usr/bin/ that leads to the chrome binary you installed.

cyragra commented 2 years ago

i have tried doing that but it starts to get --no-sandbox warnings, ive fixed those but after getting everything done the console gets spammed with getting cookie. How did you get the chrome binary so that i could try replicating

KevCui commented 2 years ago

Hey @cyragra, I don't use Ubuntu and I don't have Chrome. Instead, I installed Chromium. I believe it should be possible to install it on an Ubuntu machine. Good luck 🤞

cyragra commented 2 years ago

ive tried it with that too, nothing works. what commands did you run to install it?

KevCui commented 2 years ago

@cyragra I'm not using Ubuntu, sorry I don't know the answer to your question. You may have to find some solutions by searching online.

cyragra commented 2 years ago

dude what do you think i tried? what os are you using and how did you install the stuff man??

KevCui commented 2 years ago

Hey @cyragra, I'm currently using Arch, the Chromium I installed is this one https://archlinux.org/packages/extra/x86_64/chromium/

cyragra commented 2 years ago

@KevCui I got it working! i was looking through the code to see what was holding it up because my cpu would spike to 50 then infinitely pause at getting cookie. so i decided to check the bin folder to see if i could get a lead to what was wrong and everything was working (using my browser user agent) so i checked the code and on line 52 was the issue, with my OS (ubuntu 20.04 LTS) it pauses infinitely when using the --version command and when changed to my own user agent everything works perfectly. Perhaps you could try improving how it gets the chrome version for the user agent or using a random one because i dont think it matters too much.

_USER_AGENT="Mozilla/5.0 (Linux; Android 7.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/$($_CHROME --version | awk '{print $2}') Mobile Safari/537.36"

Error

KevCui commented 2 years ago

Hey @cyragra, thanks for letting me know this information. I think I will change the script to use some hardcoded user agents instead.

KevCui commented 2 years ago

Hey @cyragra, I made some changes in the latest commit. The user agent is hardcoded and no longer needs to get it from the --version command. It should work for you now.

cyragra commented 2 years ago

Seems to have spawned another error, also could you also post the npm commands required for the main file? Currently have to run and see what's missing. Error

KevCui commented 2 years ago

Hey @cyragra, the error in your screenshot was not related to the recent changes. It's caused by the missing file. I added a check in the latest commit.

could you also post the npm commands required for the main file?

You could run script with flag -d. It will print out all debug logs on the screen including the commands you need.

cyragra commented 2 years ago

perfect! everything ran nicely. A update to the readme it'd say is to edit the npm installations because from my tests those modules don't affect anything but installing "puppeteer" (in screenshot) within the root of the project folder seems to be the only requirement. And would also be helpful to put a in-depth installation guide because I don't know about arch but the distros I've been using with this all had a complicated install, like with pup I had to manually grab the package from the GitHub and place it in /usr/bin with proper permissions and with chrome not having its own apt package and stuff. If you need help or information on my path with it I'd be glad to help.

screenshot

KevCui commented 2 years ago

Hi @cyragra, regarding puppeteer, it should be installed when you install puppeteer-extra.