Skip to content

Using in conjunction with curl to download .htm files, failing to do so for Deviantart deviations with / in title? #3369

Answered by ClosedPort22
Jeddostotle7 asked this question in Q&A
Discussion options

You must be logged in to vote

Normally I'd manually replace the offending characters like this (reference):

{title:R:/_/}  # works
{title:R//_/}  # does not work

But for some reason it doesn't like slashes and throws an error. It would be nice to have a conversion specifier to sanitize the variable like yt-dlp does, but for the time being, I think you'd have to use a Python expression in place of the argument for "-o":

"\fE '{}{}-{}'.format(_directory, title.replace('/', '_'), index)"

The exec postprocessor does not support directory. In order to tell curl to download your HTML document to a separate directory, you need to modify the argument for "-o" and use "--create-dirs":

{_directory}mydir\\{title}-{index}.htm
"\…

Replies: 1 comment 17 replies

Comment options

You must be logged in to vote
17 replies
@ClosedPort22
Comment options

@rautamiekka
Comment options

@Jeddostotle7
Comment options

@Jeddostotle7
Comment options

@Jeddostotle7
Comment options

Answer selected by Jeddostotle7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants