mosswg / dropout-dl

A tool for downloading dropout.tv episodes
GNU General Public License v3.0
28 stars 7 forks source link

Invalid login format in file when running from cli #15

Closed skikibobski closed 10 months ago

skikibobski commented 10 months ago

I'm very new to Docker, so sorry in advance if this is a basic issue.

I've been trying to run the example command from the description, with adjusted outputs, but the only response I get is PS C:\Users\USER> docker run --rm -it -v /login:/app/login -v /downloads dropout-dl:latest --output-directory /downloads --captions -e https://www.dropout.tv/dimension-20-mentopolis Logging in... ERROR: Invalid login format in file. File must contain just your email then password on seperate lines. Example: email@example.com password123

I tried just running the Docker in Docker Desktop, but I haven't figured out how to add options and variables when running it so it just exits immediately with this in the log 2023-09-18 22:19:12 Enter episode url: Logging in... 2023-09-18 22:19:12 Successfully logged in. Cached tokens to /root/.cache/dropout-dl/token-cache 2023-09-18 22:19:12 SERIES PARSE ERROR: Could not parse series name 2023-09-18T20:19:12.746979236Z

BradMJustice commented 10 months ago

The way I did it was adding a file called simply login (no extension) to the root of the repo. First line is email, second line is password, all in plain text. The sample command worked perfectly for me. I ran the command on Windows in Powershell, if that matters.

As a broader answer to your question, the -v $PWD/login:/app/login section of the run command means that you are mounting a volume from the host (e.g. your PC's file system) to the container. You're basically saying "I'm going to share this folder on PC with the container, and it will be readable and writable from within the container by referencing the path /app/login". So the program is going to be looking in /app/login internally for a file containing your login credentials, but it will really be looking at whatever path you specify on the left of the colon.

skikibobski commented 10 months ago

So what I did was create a file, just like you said, on my desktop and then just moved it into Docker Desktop, into the /app folder, that's why running it inside Docker Desktop showed a successfull login.

Turns out I was just stupid and didn't run my terminal from the same place I had the login file. So the container was looking for the login file in my Profile folder.

Thanks for your help!

BradMJustice commented 10 months ago

No worries! Docker is a tricky beast.