FlashGot and Uget on Windows

Ask for help about FlashGot, no registration needed to post
Post Reply
J.Vega

FlashGot and Uget on Windows

Post by J.Vega »

Hi,

I installed Uget (1.6.2, stable) a few days ago and tried to make it work with FlashGot (1.2.7). (or the other way around). However, there seems to be no native support for the Windows version of Uget in FlashGot. The log shows "Warning: download manager Uget not found". I then tried to configure the download manager manually in FlashGot, but ran into problems. I configured FlashGot to had over everything that Uget is able to recognize as a command-line parameter ("uget --help" showed me that it can work with the following info: URL list file, referer, suggested filename, POST data and cookies.txt file). Doing so I encountered two problems:
1. FlashGot doesn't call the executable with the exact syntax I entered into the command line arguments template. Placeholders are not replaced by the data they should hold, but a space is prepended so that a parameter like "--http-cookie-file=cookies.txt" turns into "--http-cookie-file= cookies.txt". This breaks Uget's parsing of the parameters, it assumes that the http-cookie-file parameter has no value and that "cookies.txt" is a URL to be downloaded.
2. Searching for a workaround i found out that Uget also supports another command line parameter syntax without equal signs and with spaces permitted, e.g. "--http-cookie-file cookies.txt". However, this does not work if FlashGot doesn't pass any value for that parameter. If, for example, FlashGot has no POST data to pass to Uget, it calls "uget.exe --http-post-data --http-cookie-file cookies.txt". The --http-post-data parameter has no value and since FlashGot doesn't allow quotes in the template and doesn't use quotes by itself, Uget thinks that "--http-cookie-file" is the POST data belonging to the parameter before it. This again breaks everything.

My question is now:
Could You either include a / fix the recognition of Uget for Windows, fix the substitution of placeholders (so that they do not contain a space as the first character) or allow quotes / make FlashGot use quotes when passing command line parameters? Any of the three solutions would be greatly appreciated since I'd hate to read myself into windows scripting to write a batch file which handles the parameters for Uget ;)

Thank You very much in advance!
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: FlashGot and Uget on Windows

Post by Giorgio Maone »

UGet should be automatically detected, if it's properly installed i.e. if the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\uget.exe registry key points to UGet's path.
Alternatively you can specify it in the flashgot.dmsopts.Uget.path about:config preference.

Regarding the custom definition, the arguments template should be something like

Code: Select all

[--http-cookie-file=CFILE] [--http-post-data=POST] [--http-referer=REFERER] [--input-file=UFILE]
Hope it helps.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
J.Vega

Re: FlashGot and Uget on Windows

Post by J.Vega »

Thanks a lot!
The custom script works now.

The built-in support for Uget does not work, however. I set the about:config key to the path of the Uget executable and FlashGot can now launch Uget for downloads, but it does not pass any parameters to Uget from what I can see. Uget does not display any referer although there should be one (and if called by my custom script, it does display the referer).

Here's my custom script:

Code: Select all

[--input-file=UFILE] [--http-referer=REFERER] [--http-cookie-file=CFILE] [--http-post-data=POST] [--filename=FNAME]
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Adilson

Re: FlashGot and Uget on Windows

Post by Adilson »

Thanks man. Works like a charm.
J.Vega wrote:Thanks a lot!
The custom script works now.

The built-in support for Uget does not work, however. I set the about:config key to the path of the Uget executable and FlashGot can now launch Uget for downloads, but it does not pass any parameters to Uget from what I can see. Uget does not display any referer although there should be one (and if called by my custom script, it does display the referer).

Here's my custom script:

Code: Select all

[--input-file=UFILE] [--http-referer=REFERER] [--http-cookie-file=CFILE] [--http-post-data=POST] [--filename=FNAME]
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Post Reply