mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.89k stars 976 forks source link

gallery-dl is installed and fully updated but not working on my windows 10 #3973

Closed TheIdiotWhoNeedsAGuide closed 1 year ago

TheIdiotWhoNeedsAGuide commented 1 year ago

I tried using the Windows command window with "gallery-dl https://imgur.com/t/cute_dogs/OiGFJMW" and a bunch of other URLs but they all just say this.

'gallery-dl' is not recognized as an internal or external command, operable program or batch file.

I followed the pip installation and updated gallery-dl, the setuptools, and wheel. Python is the latest stable version as well. I looked through other questions but none of the suggestions worked. I will fully admit you might just have to link a "For idiots" guide for me. I will take any advice since I am trying to get 7 years of stuff from Reddit and Imgur.

peviq commented 1 year ago

Download Standalone windows executable and run it with cmd

shrublet commented 1 year ago

I'd assume you didn't check the option to add Python to PATH when installing Python. System properties>Environment Variables>User variables>Path. Both the base Python folder and the Python/Scripts folder should be there. The path to your python install is probably something like C:\Users\<user>\AppData\Local\Programs\Python\Python3xx\ If both directories are already in your Path variable, I'd check to make sure gallery-dl is installed correctly via pip list. Else just grab the standalone executable and call it from the command line while in the same directory.

mikf commented 1 year ago

I followed the pip installation ...

On Windows, you need to either use py -m gallery_dl or you add %LOCALAPPDATA%\Programs\Python\Python...\Scripts to your PATH environment variable, which can be done automatically by checking this box when installing Python:

_

TheIdiotWhoNeedsAGuide commented 1 year ago

I followed the pip installation ...

On Windows, you need to either use py -m gallery_dl or you add %LOCALAPPDATA%\Programs\Python\Python...\Scripts to your PATH environment variable, which can be done automatically by checking this box when installing Python:

_

Ok, I installed the standalone and it is working. How do I get it to send to an external hard drive? If it helps I am trying to do what this post on r/datahoarder explained with a text file of URLs. https://www.reddit.com/r/DataHoarder/comments/12tvpay/gallerydl_tool_to_download_entire_image_galleries

taskhawk commented 1 year ago

You specify the path to the external hard drive with the base-directory config option. For example, if your hard drive is on unit D:

{
    "extractor":
    {
        "base-directory": "D:\\gallery-dl\\",
        "imgur":
        {
            "directory": ["imgur", "{album['id']} - {album['title']}"]
        }
    }
}

You can choose whatever directory. For Windows, backslashes need to be escaped with another backslash.

TheIdiotWhoNeedsAGuide commented 1 year ago

You specify the path to the external hard drive with the base-directory config option. For example, if your hard drive is on unit D:

{
    "extractor":
    {
        "base-directory": "D:\\gallery-dl\\",
        "imgur":
        {
            "directory": ["imgur", "{album['id']} - {album['title']}"]
        }
    }
}

You can choose whatever directory. For Windows, backslashes need to be escaped with another backslash.

Okay, I figured out how to change the text file from gallery-dl.txt to gallery-dl.conf and put it under C:\Users\Isaac so it is in my user file. I also made a test file with two URLs in it named lotsofURLs1_test.txt which is located on my desktop.

After doing that I typed in the command line:

C:\Users\Isaac>gallery-dl -i lotsofURLs1_test.txt

This was the result:

[config][warning] Could not parse 'C:\Users\Isaac\gallery-dl.conf': Expecting value: line 1 column 1 (char 0)

[gallery-dl][warning] input file: [Errno 2] No such file or directory: 'lotsofURLs1_test.txt'

rautamiekka commented 1 year ago

Use / as the path separator, not \, even on Windows, since gdl is a Python app.

taskhawk commented 1 year ago

Both types of slashes work, check the Path custom type in the documentation. So it could be:

"base-directory": "D:\\gallery-dl\\"

or

"base-directory": "D:/gallery-dl/"

Whichever you are most comfy with.

[config][warning] Could not parse 'C:\Users\Isaac\gallery-dl.conf': Expecting value: line 1 column 1 (char 0)

Seems like there's an issue with your config file right on its very beginning, which seems weird. What software did you use to create the config file?

[gallery-dl][warning] input file: [Errno 2] No such file or directory: 'lotsofURLs1_test.txt'

You said you left the file in your Desktop, so you're missing part of the path to it when you call gallery-dl, it should be like:

C:\Users\Isaac>gallery-dl -i Desktop\lotsofURLs1_test.txt
TheIdiotWhoNeedsAGuide commented 1 year ago

I put the code into a text file and then changed the extension to .conf by renaming it. I just tried the desktop thing and it worked, I also needed to leave the first line blank for it to get them all. It is also not sending them to my external drive. It is still saying this though

C:\Users\Isaac>gallery-dl -i Desktop\lotsofURLs1_test.txt [config][warning] Could not parse 'C:\Users\Isaac\gallery-dl.conf': Expecting value: line 1 column 1 (char 0)

taskhawk commented 1 year ago

Yeah, it's not sending them to your external drive because your config file has an error (that's the [config][warning] message) and it's ignored until that gets fixed.

Did you use Notepad to paste the code into the text file? Can you paste the full content of your config file here?

TheIdiotWhoNeedsAGuide commented 1 year ago

Yeah, it's not sending them to your external drive because your config file has an error (that's the [config][warning] message) and it's ignored until that gets fixed.

Did you use Notepad to paste the code into the text file? Can you paste the full content of your config file here?

This is everything. I typed it in Google Docs and then downloaded it as a text file. { "extractor": { "base-directory": "D:\gallery-dl\", "imgur": { "directory": ["imgur", "{album['id']} - {album['title']}"] } } }

taskhawk commented 1 year ago

Yeah, your config is the same one and is simple enough that I see nothing wrong with it, except the backslashes but that's another issue. Maybe Google Docs is messing with it somehow. Try to copy your config in good ol' Notepad, save as .txt and rename, or save directly as .conf.

Remember that if you use backslashes you need to escape them with another backslash in base-directory.

TheIdiotWhoNeedsAGuide commented 1 year ago

I think it worked! C:\Users\Isaac>gallery-dl -i Desktop\lotsofURLs1_test.txt [1/3]  [gallery-dl][error] Unsupported URL '' [2/3] https://imgur.com/a/tKHwxE9

TheIdiotWhoNeedsAGuide commented 1 year ago

I only have two more questions. The first is how do you make it turn the files into a zip file at the destination? The second is how is how do you make it create a file of failed URLs? Failed as in got a 404 error.

rautamiekka commented 1 year ago

Both types of slashes work

I wanted to avoid teaching at least 1 person to use that ...

TheIdiotWhoNeedsAGuide commented 1 year ago

Okay I got all that working, but now I am trying to figure out how to use it on forum sites like SpaceBattles, Sufficient Velocity, and Questionable Questing. Do I need to make a new Issues thread for that or can I just ask on this one? Because I tried and it said [gallery-dl][error] Unsupported URL

TheIdiotWhoNeedsAGuide commented 1 year ago

No, gallery-dl is working. I am asking how to get it to work on forum sites like spacebattles. But it says this even though I gave my username and password C:\Users\Isaac>C:\Users\Isaac>gallery-dl -u myusername -p mypassword --zip https://forums.spacebattles.com/threads/brandon-s-pilchers-art-thread.1067915/ Access is denied.

taskhawk commented 1 year ago

These are the only sites supported:

https://github.com/mikf/gallery-dl/blob/master/docs/supportedsites.md

Open a new issue if you want them to add support for a new site, it may take a while though.

TheIdiotWhoNeedsAGuide commented 1 year ago

Ok, do you know any good ones for forum sites?

taskhawk commented 1 year ago

Sorry, I haven't had the need so I haven't looked for any, but I have heard of JDownloader and WFDownloader, so maybe look into those.