Jump to content
Ketarin forum

how execute 2or more variable in same download

Guest Paulo

Recommended Posts

Kinda. You can either create a second app profile for the other resource, or you can use a post-download script and download it using an external downloader, such as Wget or cURL. For these I usually use wget:

wget -N --output-document="{file:directory}\{imagebook:filename}" "{imagebook}"


Link to comment
Share on other sites

I assume you have actually downloaded wget?

You may have to fake the user-agent involved, as some servers don't play well with Wget. That's the "--user-agent" switch. The one below is the most generic current user-agent.

To use the value from a variable in the filename just use that in the command:

wget -N --user-agent=Mozilla/5.0 --output-document="{file:directory}\{film}.jpg" "{imagebook}"

To troubleshoot this you can look in the log (View, Show Log) to see what the replacement values are, or you can just echo the command to a text file then try the same command from the text file in a command prompt to see how the server is responding:

echo.wget -N --user-agent=Mozilla/5.0 --output-document="{file:directory}\{film}.jpg" "{imagebook}">>{startuppath}\test.txt

Then open "{startuppath}\test.txt". 

Link to comment
Share on other sites

  • 1 year later...

Good evening shawn.

i have again trouble whith wget

"H:\Ketarin film\wget\wget" -N --user-agent=Mozilla/5.0 --output-document="{file:directory}\{01name}.zip" "{DLpdf}" --no-check-certificate

its my command after download but i have an errors in log erreur 404 not found

i try to have au pdf in this site "https://moviecovers.com/film/titre_CLIFFORD%20(2021).html"

when i try in CMD windows its done but whith ketarin i have that error


Résolution de moviecovers.com (moviecovers.com)…
Connexion à moviecovers.com (moviecovers.com)||:443… connecté.
Avertissement : le certificat de « moviecovers.com » n’est pas de confiance.
Avertissement : le certificat de « moviecovers.com » a expiré.
requête HTTP transmise, en attente de la réponse… 404 Not Found
2021-12-16 21:25:42 erreur 404 : Not Found.

do you have some ideas?

Link to comment
Share on other sites

This is most likely caused by the URLencoding of space and ampersand. You can either use the ":replace" or ":multireplace" functions or you can use the :urldecode/:urlencode functions - both of which can get what you're after, but depend on you knowing which ones need to be replaced for the specific website and downloaded files. "%20" is a space. "%26" is an ampersand. Many non-English characters may also be replaced - but only on some websites. Unfortunately, it's really a matter of observation and testing for the individual website.

When I'm troubleshooting stuff like this I always echo the command to a text file so I can compare the values to what I expect vs what is actually being used. 

echo "H:\Ketarin film\wget\wget" -N --user-agent=Mozilla/5.0 --output-document="{file:directory}\{01name}.zip" "{DLpdf}" --no-check-certificate >>test.txt

"H:\Ketarin film\wget\wget" -N --user-agent=Mozilla/5.0 --output-document="{file:directory}\{01name}.zip" "{DLpdf}" --no-check-certificate

Then the file "test.txt" can be read to see what those variables are actually being replaced with. For example, the {01name} variable may include literal "%26" instead of "&"  - which is a different file name, and that will result in the command failing in Ketarin. Changing it to this (using urldecode) might be enough:

"H:\Ketarin film\wget\wget" -N --user-agent=Mozilla/5.0 --output-document="{file:directory}\{01name:urldecode}.zip" "{DLpdf:urldecode}" --no-check-certificate

Good luck! Let us know how it goes.


Also, when posting in the future it will help us (and you) if you better detail what the specific variables represent and what the values are that Ketarin is replacing them with. The same echo trick will work with that:

echo "{file}" /// "{file:directory}" /// "{01name}" /// "{DLpdf}" >>test.txt


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.