Are command-line options enough to run gallery-dl or do I need to learn JSON scripting? #4984
-
For context, I have just started trying to use gallery-dl to download URLs and I am using the .exe version. I decided to use gallery-dl after trying WFDownloader which worked, but I felt that gallery-dl would help me with more precise downloads (the reason I did was because rule34.xx wasn't supported but downloaded from rule34.us? It was confusing and I didn't try to program it to support unsupported sites). So I looked through the options.md to build my specific config files for websites. Due to my prior experience with yt-dlp (also with the .exe version) and seeing that there are command-line options (of which there are fewer than yt-dlp), I thought it would be easy to run what I wanted very quickly. I was somewhat ready to have my config fail, so I decided to download from Rule34.xxx as a test because of the lack of requirements like Twitter or DeviantArt (thought about --simulate but I wanted to see if I can download anything). I then set up batch files to make the process faster for me and ran the batch before getting hit by many errors that refused to run the .exe. To speed through them: the syntax for running programs in the batch was wrong in my file (run PATH, start PATH), the commands for using a different config were not interpreted right (in the prompt rather than through the .exe), I put gallery-dl.exe in my yt-dlp folder to run it easier, and I put the batch files in the same folder as the .exe. When it finally did seem to get my commands interpreted correctly, I was given the "[JSONDecodeError: Expecting value: line 1 column 1 (char 0)" error for my config files (none of which use JSON at all), so I gave up and just ran the commands in the console on one line by copying and pasting it. I decided to run the commands and while the options were interpreted, the URL (using tags in a .php) gave gallery-dl.exe a problem and gave me another error. Here is the verbose log of it: What I had glazed over when I was browsing the git for gallery-dl is that the configuration section states that the config file needs to be coded in JSON. I am a complete stranger to coding with JSON and Python, never doing the first while only dipping my toes into the second. Sure, I ran it without the config and the commands were working (I assume), but my intuition tells me that JSON or Python coding would help me find out what is exactly wrong since it was built from that. I don't know and I am open to any solutions for my lack of success with running gallery-dl. Please help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You need to put the URL in quotes, the download error you get now is because the command line tries to interpret it first before passing it to gallery-dl so only part of the URL gets passed, as seen in the error message (this is not specific to gallery-dl, this is how the command line works).
You can pass options on the command line with the
I don't think its much harder than only using the command line. Install an editor that has syntax highlight for JSON (like Notepad++). There are also many websites that will validate and indent JSON for you. |
Beta Was this translation helpful? Give feedback.
You need to put the URL in quotes, the download error you get now is because the command line tries to interpret it first before passing it to gallery-dl so only part of the URL gets passed, as seen in the error message (this is not specific to gallery-dl, this is how the command line works).
You can pass options on the command line with the
-o
flag like-o "option=value"
but in my experience you will be better off with the config file for anything non-trivial.