I just tried it with
./gogdownloader -s https://www.gog.com/en/download/game/commandos_ammo_pack/0
and I got an error:
Getting XML data
terminate called after throwing an instance of 'std::out_of_range'
Trying remote file...Aborted
[edit for further info]
I tried then with --no-remote-xml and it reaches the CDN but then seg faults:
> GET /0011DF/secure/commandos_ammo_pack/setup_commandos_ammo_pack.exe?1223fb43868c5f174d699ac8593ffcf6aac26b7022fc5 196f192669a33d09fbbddd363ad2e7db811a15d75ec8d99e86ff8644f7a0f9d64b3b897ef362e41946df9b490eb39428e715fe871c2f52 3f55a650bb2597450730071b0fed34a10bf5a9a7b3d58285925bf55ac3a510efa4fc8&fileExtForIe=.exe HTTP/1.1
User-Agent: GOGDownloader/0.18 libcurl-agent
< HTTP/1.1 200 OK ] 0.00/0.00MB @ 0.00kB/s
< Accept-Ranges: bytes
< Cache-Control: max-age=604800
< Content-Type: application/octet-stream
< Date: Fri, 02 Sep 2011 21:02:16 GMT
< ETag: "1550332266"
< Expires: Fri, 09 Sep 2011 21:02:16 GMT
< Last-Modified: Tue, 06 Oct 2009 08:07:16 GMT
< Server: ECAcc (ams/48BF)
< X-Cache: HIT
< Content-Length: 648196751
After some debugging I found out that if gogdownloader is used with the URL using HTTPS (instead of HTTP), which is what we get with a copy link from GOG, there is an extra redirect (from https to http) and as a consequence the filename will be empty which will lead to the errors above.
So, using url with http, gogdownlader works fine.
BTW, before I realised there was a redirect from https to http, I tried to setopt curl to accept exactly one redirect. However, the getinfo would then return a NULL pointer with the redirect location. Any idea why this happens?