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
LGOGDownloader is open source downloader to GOG.com for Linux users using the same API as the official GOGDownloader
It is licenced under WTFPL licence

Current features:
- Listing available games (simple and detailed list)
- Batch downloading
- Repair downloaded installers/extras
- Resume unfinished downloads
- Cover downloading
- Perl regular expressions for filtering games
- Download speed limiting
- Checking for update notifications
- Listing/downloading updated files
- Checking for orphaned files
- Checking status of files
- Blacklisting files

Currently missing features:
- Downloading individual files by id number

Cookies and config files are saved to $XDG_CONFIG_HOME/lgogdownloader
Created GOG XML files are saved to $XDG_CACHE_HOME/lgogdownloader/xml
By default all downloads are saved to current working directory
Subdirectories for games are automatically created

--update-check shows how many games have been updated
It also shows how many new private messages and forum replies you have
The API doesn't provide list of updated files so I can't show which files have been updated without parsing the account page like in the previous downloader
Compiling and installing the downloader:

sudo apt-get install build-essential libcurl4-openssl-dev liboauth-dev libjsoncpp-dev libhtmlcxx-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-program-options-dev libboost-date-time-dev libtinyxml-dev librhash-dev help2man
wget https://sites.google.com/site/gogdownloader/lgogdownloader-2.19.tar.gz
tar -xvzf lgogdownloader-2.19.tar.gz
cd lgogdownloader-2.19
make release
sudo make install

PKGBUILD for Arch Linux users
https://aur.archlinux.org/packages/lgogdownloader/
PKGBUILD for Arch Linux users (git version)
https://aur.archlinux.org/packages/lgogdownloader-git/
PPA for Ubuntu users
https://launchpad.net/~nilarimogard/+archive/ubuntu/webupd8
Debian packages for Debian (stable) users
http://mash-systeme.de/downloads-view-content
Repository for Debian (stable) users
deb http://mash-systeme.de/debian/ wheezy main
Debian (testing and unstable) - lgogdownloader is now in the repository (https://tracker.debian.org/pkg/lgogdownloader)

Usage examples:

Login to create cookies and config files
lgogdownloader --login

List all available games
lgogdownloader --list

List all games beginning with "t"
lgogdownloader --list --game '^t.*'

Download all extras to /media/sdb1/GOG/ and limit download speed to 500 kB/s
lgogdownloader --download --no-installers --directory /media/sdb1/GOG/ --limit-rate 500

Download "Beneath a steel sky", don't download cover images
lgogdownloader --download --game beneath_a_steel_sky --no-cover

Repair all installer files of witcher 1 & 2
lgogdownloader --repair --no-extras --game witcher

Create GOG XML for a file with 2MB chunks
lgogdownloader --create-xml /path/to/file.ext --chunk-size 2

Download all free games and automatically create GOG XML for extras
lgogdownloader --download --game free --create-xml automatic

Check for orphaned files (files found on local filesystem that are not found on GOG servers)
lgogdownloader --check-orphans

Some documentation that I wrote for the GOG API
GOG API Documentation

https://github.com/Sude-/lgogdownloader
Post edited Yesterday by Sude
A note for Archers trying to build this.

Install jsoncpp-fixed from the AUR and then modify $lgogsrcdir/include/api.h line 18 to read #include <jsoncpp/json.h> rather than #include <jsoncpp/json/json.h>.

This might be necessary on other distros, too.

Optionally, you might create the dir /usr/include/jsoncpp/json and symlink /usr/include/jsoncpp/*.h to that dir.

I'll look into making a PKGBUILD later, but I'll need to figure out how to make a patch file to make that change.
Alright I've made a PKGBUILD and I intend to upload to the AUR soonish. But right now, lgogdownloader doesn't work!

I've run lgogdownloader --login and entered my password, but at every attempt I just get "HTTP: Login failed".

Not sure if I'm missing a dependency or if something is going crazy at the GOG servers or something, but I'm definitely connected and should be able to make a connection.
This is very, very cool! I might try this when I redownload Witcher 2 again.
avatar
TheJoe: Not sure if I'm missing a dependency or if something is going crazy at the GOG servers or something, but I'm definitely connected and should be able to make a connection.
Nothing to blame here but my stupidity
While cleaning up the sources to remove commented out old code that wasn't working I managed to somehow delete some part of the code for the login
I accidentally deleted the part that sends the POST to login form

I should have tested the login one more time before first releasing it :\

anyway here's a fixed source
http://sites.google.com/site/gogdownloader/lgogdownloader-1.1.tar.gz
avatar
Sude: sneep
Haha, thanks very much for the update. It works fine now it seems.

The PKGBUILD for Arch users can be found here.

Now to download some games! Thanks a bunch, Sude!
Well apparently there was a small bug caused by copy/pasting code and forgetting to change it.
--update-check didn't actually show the number of new forum replies but the number of new private messages

http://sites.google.com/site/gogdownloader/lgogdownloader-1.2.tar.gz
Just taken it for a spin downloading a game and it's great!

The automatic folder structure is clean, making offline archiving easy and efficient; since I accidentally wiped the drive all my GOGs were on this is going to be really handy.

It didn't grab the cover art, though. I downloaded Beneath a Steel Sky and did not use the --no-cover flag, but it didn't seem to grab it.

Additionally, I'm not big on the --filter option. When searching through --list you should use grep to single out individual lines. I wonder if instead it should be --game and accept an 'all' parameter; lgogownloader --download --game all would download everything.
avatar
TheJoe: It didn't grab the cover art, though. I downloaded Beneath a Steel Sky and did not use the --no-cover flag, but it didn't seem to grab it.
That's weird, Beneath a Steel Sky does download the cover for me at the moment
sude@lmde:~ $ lgogdownloader --download --game beneath --no-extras
Getting game info 1 / 1
Downloading cover beneath_a_steel_sky/cover_0.jpg
100% [==========================] 0.98/0.98MB @ 143.26kB/s
beneath_a_steel_sky/setup_beneath_a_steel_sky.exe
100% [==========================] 71.69/71.69MB @ 9176.81kB/s

I did update the cover list recently though, perhaps something was broken on the cover list before I updated it
avatar
TheJoe: Additionally, I'm not big on the --filter option.When searching through --list you should use grep to single out individual lines. I wonder if instead it should be --game and accept an 'all' parameter; lgogownloader --download --game all would download everything.
--filter isn't exactly a good name for it
it's now renamed to --game

lgogdownloader --list | grep 'something' == lgogdownloader --list --game 'something'

I added two regex aliases to it:
"--game all" == "--game .*" and downloads all games
"--game free" is a list of free games

http://sites.google.com/site/gogdownloader/lgogdownloader-1.3.tar.gz
Post edited August 02, 2012 by Sude
avatar
Sude: sneep
avatar
TheJoe: Haha, thanks very much for the update. It works fine now it seems.

The PKGBUILD for Arch users can be found here.

Now to download some games! Thanks a bunch, Sude!
Thanks for the PKGBUILD. Works perfectly.
First of alll, a big thank you for your work!

I also would like to add that there was some trouble with the build dependencies on my Ubuntu 12.04 system. libcurl4-openssl-dev and liboauth-dev cannot coexist, so I skipped libcurl4-openssl-dev and it seemed to work fine. My line for installing the prerequisites (for easy copy + paste):

sudo apt-get install build-essential liboauth-dev libjsoncpp-dev libhtmlcxx-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-program-options-dev libtinyxml-dev librhash-dev
Well, I do feel rather stoopid right now. I can get it to compile, but not to download anything. Login works fine, --list works fine, but --download does not work.

lgogdownloader --download --game beneath_a_steel_sky
* Line 1, Column 1
Syntax error: value, object or array expected.

It's gogAPI->error_message that is being printed. Any suggestions?
avatar
gthornblad: Well, I do feel rather stoopid right now. I can get it to compile, but not to download anything. Login works fine, --list works fine, but --download does not work.

lgogdownloader --download --game beneath_a_steel_sky
* Line 1, Column 1
Syntax error: value, object or array expected.

It's gogAPI->error_message that is being printed. Any suggestions?
I have exactly the same error, I'm on Ubuntu 12.04 (64-bit), too. I've installed all dependencies that I could (I've also experienced your error message).
I just installed Ubuntu in a VM and was able to reproduce the error

Breakpoint 1, API::getGameDetails (this=0x656b60, game_name=...)
at src/api.cpp:316
316 return game;
(gdb) print json
$10 = {static npos = <optimized out>,
_M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
_M_p = 0x6604a8 "<h1>Error 403 - Access Forbidden (Array)</h1>\n\n"}}
Well there's the problem, for some reason the request doesn't get authorized

edit:

Breakpoint 2, API::getResponseOAuth (this=0x656b60, url=...) at src/api.cpp:251
251 return response;
(gdb) print url
$12 = {static npos = <optimized out>,
_M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
_M_p = 0x6572a8 "https://api.gog.com/en/downloader2/game/beneath_a_steel_sky/?oauth_consumer_key=1f444d14ea8ec776585524a33f6ecc1c413ed4a5&oauth_nonce=", 'a' <repeats 15 times>, "&oauth_signature_method=HMAC-SHA1&oauth_timestamp=13"...}}
And there's the reason it doesn't get authorized: "'a' <repeats 15 times>"

edit2:
I think there's something wrong with the liboauth package in Ubuntu
This can be fixed by adding lhw's ppa and updating liboauth

sudo add-apt-repository ppa:lhw/packages
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
Post edited August 17, 2012 by Sude
I am not getting the same error on Arch. I would guess that this is an issue caused by those two conflicting libraries in Ubuntu.