It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
high rated
Hello :)
I realized a script (for linux) for downloading and for resuming the download of GoG games and their additional contents.
I created it, because I have a very very slow connection, that goes up and down. That was a big problem for me, so I realized this script, that tries and tries again, untill the download of one file is complete.
I don't know if someone of you will think that this script is useful, because GoGDownloader works on linux too, but I think that GoGDownloader is not enogh autonomous as my script is.

This is a mini guide for using it:

1) Download it here and unzip it.
2) Open terminal, navigate to the directory where you unzipped it, and type this command:

chmod u+x ./GoGDownloader.sh

Now you can use the script for downloading your games :)
3) Type:

./GoGDownloader.sh <directoryWhereSaveFiles>

The first time you run this script, you will need to login. After that, in your home directory will created an hidden directory, named .GoGDownloader. In that directory will be created a file named "cookies.txt". WARNING: DON'T, and I underline, DON'T give anyone this file! It contains personal information and could make anyone get YOUR GoG games. So be careful with it!
The next time you will run the script, you will not need to login again, if you don't remove "cookies.txt" file.
4) Script will start and will show you the list of your games. If you choose to download one of it, type the corrisponding number, for example 3.
The script will download first the setup files, then the additional contents and finally DVD cover of the choosen game. This last function doesn't work very well, because of the differences between name of games and names written in the post. For example, in the forum same "2" are written as "II", etc...

That's all folks :)

PS I really appreciate comments, expecially propositive ones. If you notice some bug, if you need help, if you have some suggestion, if you want more functionalities, if you think this script is useless, post here :)

NEWS: Sude modified the script for making it working also on windows. Read here


Edit: if after the download you have problems with corrupted files, read here
Post edited April 27, 2011 by WrathOfTheAngels
well, i don't use linux but this sounds pretty neat.
Post edited January 16, 2011 by WBGhiro
You may be interested in the cross-platform downloader I am working on when I have it up and running.

It should support checking for new versions (without downloading the whole thing) and other such goodness :)
Great work. We definately need more downloader, and a script such as this is very welcome.

Hey, did you know that you can create cookies and log in using wget? That way you don't have to ask your users to export their browser cookies.

To log in, get https://www.gog.com/en/login with the following POST variables: log_email, log_password and redirectOk

Do that with the --load-cookies, --save-cookies, --keep-session-cookies and -S options, then read the response header that you get to see if the redirect succeeded. If it contains the text "loginbad=yes" then the login failed, otherwise it succeeded.

Now your script doesn't need to be supplied with a cookie file anymore, as it can create its own.

edit: You're also making a downloader, xyem? I look forward to seeing yours when it's ready. If I may ask, how do you check for new versions without downloading the whole file?
Post edited January 16, 2011 by Barefoot_Monkey
cool! (though I am a Mac user myself)
avatar
xyem: You may be interested in the cross-platform downloader I am working on when I have it up and running.

It should support checking for new versions (without downloading the whole thing) and other such goodness :)
nice ... that's definitely in my wish list ...
Post edited January 17, 2011 by crazy_dave
avatar
Barefoot_Monkey: edit: You're also making a downloader, xyem? I look forward to seeing yours when it's ready. If I may ask, how do you check for new versions without downloading the whole file?
The version information is stored at the start of the file, it'll only have to download the first megabyte or so of it to check it.

Also considering making it so all the downloaders can connect together (in a torrent-like swarm) and pass version information around so as soon as one client finds out the latest version, it can pass it around to the other clients connected to it.

Also, there will be a central place to upload the version information to, to "jump-start" new clients.

Of course, all the above will be optional functionality :)
Post edited January 16, 2011 by xyem
avatar
xyem: Also considering making it so all the downloaders can connect together (in a torrent-like swarm) and pass version information around so as soon as one client finds out the latest version, it can pass it around to the other clients connected to it.
That sounds quite exploitable. Someone else could quite easily, with such code readily available, create a client that only connects to other clients and gets the games that way without having to authenticate. Granted, torrents for GOG games have already existed for quite a while, but I'm not sure we should give those people more ways than already exists to fetch the games without paying.

Unless you have an idea for making sure the other clients are legitimate..
Post edited January 16, 2011 by Miaghstir
avatar
xyem: Also considering making it so all the downloaders can connect together (in a torrent-like swarm) and pass version information around so as soon as one client finds out the latest version, it can pass it around to the other clients connected to it.
avatar
Miaghstir: That sounds quite exploitable. Someone else could quite easily, with such code readily available, create a client that only connects to other clients and gets the games that way without having to authenticate. Granted, torrents for GOG games have already existed for quite a while, but I'm not sure we should give those people more ways than already exists to fetch the games without paying.

Unless you have an idea for making sure the other clients are legitimate..
I believe he's talking about sharing just the metadata (filename, filesize, version, hash) and not sharing the files themselves or the generated links.
for what it is worth
Wget exists for windows as well. So if you are up for some .bat scripting ;)
avatar
Barefoot_Monkey: I believe he's talking about sharing just the metadata (filename, filesize, version, hash) and not sharing the files themselves or the generated links.
Exactly, the metadata is shared to provide a better experience but you still download from GOG.

I'm using torrent as a model, so if a small part of the file gets corrupted during download, the hashes from other clients should pinpoint it so your client only has to re-download that segment. That'll be something for later versions though (version 1 is just "download the games" :])
avatar
Barefoot_Monkey: I believe he's talking about sharing just the metadata (filename, filesize, version, hash) and not sharing the files themselves or the generated links.
avatar
xyem: Exactly, the metadata is shared to provide a better experience but you still download from GOG.

I'm using torrent as a model, so if a small part of the file gets corrupted during download, the hashes from other clients should pinpoint it so your client only has to re-download that segment. That'll be something for later versions though (version 1 is just "download the games" :])
That does sound interesting. Even more so if it could be used for automatic downloading ov everything that's been added or changed on my account since the last time I downloaded the files.
avatar
Barefoot_Monkey: Great work. We definately need more downloader, and a script such as this is very welcome.

Hey, did you know that you can create cookies and log in using wget? That way you don't have to ask your users to export their browser cookies.

To log in, get https://www.gog.com/en/login with the following POST variables: log_email, log_password and redirectOk

Do that with the --load-cookies, --save-cookies, --keep-session-cookies and -S options, then read the response header that you get to see if the redirect succeeded. If it contains the text "loginbad=yes" then the login failed, otherwise it succeeded.

Now your script doesn't need to be supplied with a cookie file anymore, as it can create its own.

edit: You're also making a downloader, xyem? I look forward to seeing yours when it's ready. If I may ask, how do you check for new versions without downloading the whole file?
this is goog :) as soon as possible (I hope in this week-end) I'll apply this change :)
avatar
xyem: Exactly, the metadata is shared to provide a better experience but you still download from GOG.

I'm using torrent as a model, so if a small part of the file gets corrupted during download, the hashes from other clients should pinpoint it so your client only has to re-download that segment. That'll be something for later versions though (version 1 is just "download the games" :])
avatar
Miaghstir: That does sound interesting. Even more so if it could be used for automatic downloading ov everything that's been added or changed on my account since the last time I downloaded the files.
quote

Xyem what lenguage are you using for realizing your downloader? I considerated Java, but I don't have enough time (I work everyday, almost for the entire day) for understanding how to login and resume download... So I worked only on my script...
avatar
Miaghstir: That does sound interesting. Even more so if it could be used for automatic downloading ov everything that's been added or changed on my account since the last time I downloaded the files.
avatar
WrathOfTheAngels: quote

Xyem what lenguage are you using for realizing your downloader? I considerated Java, but I don't have enough time (I work everyday, almost for the entire day) for understanding how to login and resume download... So I worked only on my script...
whoa ... you just replied right after another one of your posts and it created a new post ... did they change that?!
avatar
Qbix: for what it is worth
Wget exists for windows as well. So if you are up for some .bat scripting ;)
Ehm... I don't have the knowledge for this translation, but I think one day I'll do it. even if I think that it will not be efficient like is under linux...