Gallery-dl: [e621] How to download with Score tags?

Created on 21 Dec 2020  路  7Comments  路  Source: mikf/gallery-dl

As the title suggests, id like to get posts under a specific tag, that meet a specific score, but the command id think to use for such a thing, isn't working. Im trying to use something like "gallery-dl --download-archive e621.sqlite3 "https://e621.net/posts?tags=TAG+score%3A>%3D100"", but it does not work. perhaps the score part needs to be typed differently for it to process?

EDIT: As a bit of a bonus, what would I do for tags with special characters like an "贸"? Tags with special characters like that also don't seem to work, even when in quotation marks.

question

Most helpful comment

I remember there being an issue with percent signs % in .bat files.
You need to write each % as %% to make it work, e.g. https://e621.net/posts?tags=TAG+score%%3A%%3E%%3D100

https://ss64.com/nt/syntax-percent.html
https://stackoverflow.com/questions/13551829/escape-percent-in-bat-file/13552702#13552702

All 7 comments

Please define "does not work", does it not download at all, does it download the wrong files? What exactly does it do? For what it's worth, the command you provided works perfectly here on zsh, perhaps try with single quotes ' instead of double quotes ".

OK, so... I did some debugging, and found that it DOES work, just not from a .bat file. Running such a command directly within the command prompt works perfectly fine, it seems. In that case, I wonder if there is any way to have it work under a BAT file properly, or nah?

I remember there being an issue with percent signs % in .bat files.
You need to write each % as %% to make it work, e.g. https://e621.net/posts?tags=TAG+score%%3A%%3E%%3D100

https://ss64.com/nt/syntax-percent.html
https://stackoverflow.com/questions/13551829/escape-percent-in-bat-file/13552702#13552702

Gave that a shot, and it worked! Thank you so much! Ill be sure to keep this in mind, for the future.

Before I close this issue, does anyone know how to handle special characters, like that "贸" I mentioned in the edit of the initial question I posted?

Special characters should just work as is, e.g. /?tags=balc贸n, unless cmd.exe or the BAT file parser interfere. Copying such a tag from your browser's address bar should yield the urlescaped version (/?tags=balc%C3%B3n) where you'd again have to duplicate all %s for BAT files (/?tags=balc%%C3%%B3n).

That also worked, too! Ive learned a good bit today, so thank you for your wisdom. Ill be sure to keep this all in mind, for the future.

Reason #13241 to use PowerShell instead. Single-quotation marks for literal verbatim strings.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arisboch picture arisboch  路  4Comments

blackoutworm picture blackoutworm  路  5Comments

kattjevfel picture kattjevfel  路  6Comments

OvertPerson picture OvertPerson  路  5Comments

CaptainJawZ picture CaptainJawZ  路  5Comments