Giter VIP home page Giter VIP logo

gogrepo's People

Contributors

disi avatar eddie3 avatar hamsterexastris avatar jpenney avatar resonantworks avatar shiryou avatar tiehichi avatar trilarion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gogrepo's Issues

XML Parsing Error

I'm getting an XML parsing error even after downloading the latest commit from 4 days ago.

I printed the URL which the

if fetch_md5:
    if os.path.splitext(page.geturl())[1].lower() not in SKIP_MD5_FILE_EXT:
        tmp_md5_url = page.geturl() + '.xml'

handles, since that's what shows as edited on the latest fix, and got:

https://gog-cdn-lumen.secure2.footprint.net/token=nva=<number was here>~dirs=6~token=<some token was here>/secure/offline/<number was here>/<number was here>/<number was here>/<number was here>/setup_beautiful_desolation_1.0.7.3_win_%2864bit%29_%2856745%29.exe

which I can kind of tell doesn't have the md5 as [1], as the

os.path.splitext(page.geturl())[1]

leaves only ".exe" to deal with.

Is this an issue only on my end?

Error when trying to download OS specific files only to specified directory

Hello! Awesome utility, this! But I have encountered a little trouble trying to use it:

I've successfully downloaded files to an external disk, with default gogrepo.py, by running

cd /media/USER/DISK/Games/GOGrepo/gogrepo-master
./gogrepo update
./gogrepo download /media/USER/DISK/Games/GOGrepo/gogrepo-library/

I then found that it was only the Windows files being downloaded, which I assume is a result of line 113 in gogrepo.py:

DEFAULT_OS_LIST = ['windows']

I updated this to

DEFAULT_OS_LIST = ['windows', 'linux', 'mac']

I created directories for all OS', so as to have better overview

/media/USER/DISK/Games/GOGrepo/gogrepo-library-Windows
/media/USER/DISK/Games/GOGrepo/gogrepo-library-Linux
/media/USER/DISK/Games/GOGrepo/gogrepo-library-Mac

I've run both ./gogrepo.py update -os windows linux mac and ./gogrepo update (which should do the same now, due to my editing the gogrepo.py file) to get all OS' in the manifest.
To download all Linux files to the -Linux directory, I ran ./gogrepo.py download -os linux /media/USER/DISK/Games/GOGrepo/gogrepo-library-Linux

However, I get an error when trying to download this way.

§ ./gogrepo.py download -os linux /media/USER/DISK/Games/GOGrepo/gogrepo-library-Linux/
usage: gogrepo.py [-h] [-v]
                  {login,update,download,import,backup,verify,clean} ...
gogrepo.py: error: unrecognized arguments: -os /media/USER/DISK/Games/GOGrepo/gogrepo-library-Linux/

What am I doing wrong?


Also, on that note, I'd like to suggest, if possible, to have the download automatically create directories based on operating system.
E.g. (very crude, but you get the picture)

divinity_original_sin/
windows/
---setup_divinity_original_sin.exe
linux/
---setup_divinity_original_sin.sh
mac/
---setup_divinity_original_sin.dmg

[enhancement] Ignore list

Would be great if you could have an ignore list which you could either supply on the command line or reference a text file which update and download could use.
For example, I want "shadow_warrior_2013_dx_9_version" but do not want "shadow_warrior_2013_directx_11_version".

Login always fails with "cannot continue, gog is asking for a reCAPTCHA :( try again in a few minutes."

As title says, I can never manage to log in via gogrepo, and had to edit the cookie manually with the new tokens from my GOG Galaxy cookies.

I tried multiple times over several days and the same error always occurs.
I considered that this may be the cause for my other issue, but I can fetch the game pages, so it seems like I did alright...
Unless using the Galaxy cookies causes the server to provide a different response which this client isn't built to handle.

Login Fails

For a few days now, there seems to be an issue in several Ways:
First, the updating throwed a 403 at me, tried with python2 and python3 on a debian 9 system.
Because I assumed that this may be due to the cookies being expired, I deleted the cookies.dat file. Now, when I try to login with the correct credentials, it fails. Asking me whether Username and password are correct (which they are, after a while I wrote them into the variables directly inside the script to be sure of that to no effect). I'm rather skilled with python, however not with the workings of gog.com, so I may assist you debugging if needed.

[suggestion] Slight change to download -id behaviour?

Something I've noticed is that, in its current form, if you specify an ID that doesn't exist (whee, typos), the script jumps straight to trying to download ALL the games in your manifest. I don't think that's ideal behaviour, because if a user is going to the trouble of using -id, then they're not exact wanting to download everything in the first place.

I think instead, if it can't find an ID, it should just end there, with a message to explain what happened.

xml parsing error occurred trying to get md5 data for ....

Looks like gog may have changed something recently. We have received and confirmed reports (as per retronas/retronas#117) of our users getting xml parsing errors during manifest refresh from this tool.

Refreshing GOG manifest...

06:07:32 | loading local manifest...
06:07:32 | fetching game product data (page 1)...
06:07:33 | fetching game product data (page 2 / 3)...
06:07:33 | fetching game product data (page 3 / 3)...
06:07:34 | (  1 / 255) fetching game details for a_space_for_the_unbound_prologue...
06:07:41 | xml parsing error occurred trying to get md5 data for setup_a_space_for_the_unbound_-_prologue_v8.54g_(45722).exe
06:07:41 | (  2 / 255) fetching game details for absolute_drift...
06:07:48 | xml parsing error occurred trying to get md5 data for setup_absolute_drift_1.0g_(64bit)_(49142).exe
06:07:48 | (  3 / 255) fetching game details for against_the_moon_prologue...
06:07:54 | xml parsing error occurred trying to get md5 data for setup_against_the_moon_prologue_129_(42110).exe
06:07:54 | (  4 / 255) fetching game details for akalabeth_world_of_doom...
06:08:00 | xml parsing error occurred trying to get md5 data for setup_akalabeth_2.0.0.1.exe
06:08:09 | (  5 / 255) fetching game details for alders_blood_prologue...

Unable to Verify games with Windows directory specified

I have been successfully downloading my GOG collection to a remote (SMB fileshare) directory from Windows 10, however when I attempt to verify the games and I specify any directory, I receive the error below.

The code I use to initiate the verification is the following batch script
@ECHO ON gogrepo.py verify \\NAS\FamilyStorage\Family\Games\GOG

SyntaxError: invalid syntax 16:21:30 | loading local manifest... 16:21:31 | fatal... Traceback (most recent call last): File "C:\gogrepo\gogrepo.py", line 2362, in <module> main(process_argv(sys.argv)) File "C:\gogrepo\gogrepo.py", line 2335, in main cmd_verify(args.gamedir, args.skipextras,args.skipids,check_md5, check_filesize, check_zips, args.delete, args.clean,args.ids, args.os, args.lang,args.skipgalaxy,args.skipstandalone,args.skipshared, args.forceverify) File "C:\gogrepo\gogrepo.py", line 1985, in cmd_verify items = load_manifest() File "C:\gogrepo\gogrepo.py", line 337, in load_manifest return eval(ad) File "<string>", line 31896 u'downloads': ^ SyntaxError: invalid syntax

[enhancement] Download Images

Add the images to the extras download, would be nice if you could change the image name from the current name to the name of the game as well
The parsing is already being done 'bg_url' and 'image_url'.
It would be nice if you could add a separate key for images that would download them all to one folder
example...
gogrepo.py dlimages %cd%\images

ValueError: unknown url type: undefined

12:05:05 | attempting gog login as '[email protected]' ...
12:05:05 | fatal...
Traceback (most recent call last):
File "D:\GOG Downloads\gogrepo.py", line 1121, in
main(process_argv(sys.argv))
File "D:\GOG Downloads\gogrepo.py", line 1093, in main
cmd_login(args.username, args.password)
File "D:\GOG Downloads\gogrepo.py", line 550, in cmd_login
with request(login_data['auth_url'], delay=0) as page:
File "D:\GOG Downloads\gogrepo.py", line 170, in request
page = opener.open(req)
File "C:\Program Files (x86)\Python\lib\urllib2.py", line 421, in open
protocol = req.get_type()
File "C:\Program Files (x86)\Python\lib\urllib2.py", line 283, in get_type
raise ValueError, "unknown url type: %s" % self.__original

Multiple directories / hard-drives

I was wondering if it was possible to have an entire collection on multiple hard drives. I don't want to go for a RAID setup and since my 8TB drive is filled with gog installers, I'd rather add another few TB to the mix instead of buying a rather expensive 10+ TB drive. Is such a thing even possible with gogrepo?

Sorry if that's not the place to post or if this was already answered, I have very limited experience with Github so far.

Extras in separete folder

Hello.
Is there a way to save extras like manuals sundtracks etc. to separete folder ?
./GameName/Extras
This would help keep folders tidy.

Download only new/updated

I don't want to have to re-download everything when games are added or updated.
Is this currently possible, and I'm just missing it, or would this be an enhancement request?

The same for files which fail the verify, can we download only those?

Download/Unicode error

I'm getting a 'UnicodeDecodeError' for unclear reasons.
I tried recreating the manifest and even went as far as trying a fresh copy of gogrepo in an empty folder, same thing happens.

19:40:35 | pass bad_mojo_redux_avatar.zip
19:40:35 | pass bad_mojo_redux_concept_art.zip
19:40:35 | pass bad_mojo_redux_gallery.zip
19:40:35 | {banished}
19:40:35 | download setup_banished_64_1.0.7_(14938).exe
19:40:35 | download setup_banished_32_1.0.7_(14938).exe
19:40:35 | {bastion}
19:40:35 | fatal...
Traceback (most recent call last):
File "F:\Games\GOG\gogrepo-master\gogrepo.py", line 1172, in
main(process_argv(sys.argv))
File "F:\Games\GOG\gogrepo-master\gogrepo.py", line 1152, in main
cmd_download(args.savedir, args.skipextras, args.skipgames, args.skipids, args.dryrun, args.id)
File "F:\Games\GOG\gogrepo-master\gogrepo.py", line 823, in cmd_download
with ConditionalWriter(os.path.join(item_homedir, INFO_FILENAME)) as fd_info:
File "F:\Games\GOG\gogrepo-master\gogrepo.py", line 221, in exit
for (new_chunk, old_chunk) in zip_longest(tmp, orig):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\codecs.py", line 714, in next
return next(self.reader)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\codecs.py", line 645, in next
line = self.readline()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\codecs.py", line 558, in readline
data = self.read(readsize, firstline=True)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\codecs.py", line 504, in read
newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xdf in position 0: invalid continuation byte

Upon some further research, the !info.txt file for Bastion looks like this:


So I guess the error is warranted.
I'll try to recreate it once more...

Eador Master of the Broken World fails to fetch game files

There was an update on the game today and I tried to fetch the new installer and dlc. On the Account website I can see the links as:

https://www.gog.com/downlink/eador_masters_of_the_broken_world/en1installer4
https://www.gog.com/downlink/eador_masters_of_the_broken_world/en1patch2
https://www.gog.com/downlink/eador_masters_of_the_broken_world/de1installer4
https://www.gog.com/downlink/eador_masters_of_the_broken_world/de1patch2

it does fetch the extras just fine.

  'downloads': [],
  'extras': [{'desc': u'Handbuch',
              'href': u'https://www.gog.com/downlink/file/eador_masters_of_the_broken_world/21653',

Actual only the patch version increased and I've got the installer from a previous download.
http://i.imgur.com/2JL82SH.jpg

"Skip games marked as hidden" function not working

The update command says that it will skip games marked as hidden, but it doesn't appear to do so. I've marked various demos as hidden, but they still appear in the manifest and as missing files when using the verify command.

login issue: TypeError: putch() argument 1 must be char, not unicode

C:{directory here}>gogrepo.py login
enter username: [email protected]
11:35:03 | fatal...
Traceback (most recent call last):
File "C:{directory here}", line 1167, in
main(process_argv(sys.argv))
File "C:{directory here}", line 1139, in ma
in
cmd_login(args.username, args.password)
File "C:{directory here}", line 537, in cmd
_login
login_data['passwd'] = getpass.getpass("enter password: ")
File "C:\Python27\lib\getpass.py", line 95, in win_getpass
msvcrt.putch(c)
TypeError: putch() argument 1 must be char, not unicode

I replaced my actual directory name with {directory here}

update with different or additional languages than en (English)

Some games like Randal's Monday and a lot more have all languages build into one file.
If you choose more than one languages (i.e. -lang en de), the script will iterate through the languages and add the file twice to the manifest.
This results in two downloads for the same file, for the second it actual counts into negative for displaying progress.

If you choose only a different languages than en (English), it will not add files for games that doesn't support the language. For example '-lang de' will not fetch any game files for 'Memoria'.

Import bug

Small bug as of commit 'ae50d09ac83625496c14f8be784d341aa0dca3aa' line 678:
if game_item.md5 in md5_info:
should be
if game_item.md5 not in md5_info:

Thanks for the work!

[enhancement] Skip already verified

Have a indicator in the manifest or use another database tracker to mark which files have already been verified to skip on the next pass of the scan. Would be best to have this feature enabled on by default and then include a full scan option as well.

XML error has reappeared

Over the past couple of days, I've noticed that the XML parsing error is still around for a handful of games, despite using your updated commit.

Here is the list of games which still generate an error:

Black Skylands
Brigador: Up-Armored Edition
Cyberpunk 2077
Daggerfall: Unity - GOG Cut
Darwinia
Deus Ex: Mankind Divided
Blackwell Legacy
Blackwell Unbound
Fates of Ort
Hellpoint
Lost Ember
Metro: Last Light Redux
No Man's Sky
Orbital Bullet
Riven - The Sequel To Myst
Star Renegades
Stellaris
Superhot
Superhot: Mind Control Delete
Tunic
Underrail

Python3 support

A tracking ticket for python3 since python2 is without official support from python.org

locale issue

I've found a locale issue on windows with python 3 a bit of an edge case.

Basically without specifying the encoding in python3 it seems to use system default which on windows depends on locale the issue will only show with titles containing characters that are not present in the current code page so say the registered trademark symbol and the Japanese code page. This causes an error on write.

I fixed this by stealing the code snippet from user2395922 here https://stackoverflow.com/questions/10971033/backporting-python-3-openencoding-utf-8-to-python-2 then added in encoding='utf-8' all over the place. Seems to work in both python 3 and 2.7 only difference with 2.7 is line endings become unix. If you want I can provide it as a pull request, have no idea what I'm doing otherwise I'd probably have done that. That said there is probably a better way of doing it.

Anyway thanks for the script.

File naming inconsistency in comparison to Galaxy downloads.

I noticed that gogrepo consistently shows a file naming inconsistency, compared to downloads using the Galaxy downloader.

For example, if I download a file with Galaxy, named

setup_cryptark_1.2_(15131).exe

and then fire up gorgrepo to check for updates and download them, it does not recognize the already downloaded file and downloads it again as

setup_cryptark_1.2_%2815131%29.exe

The first time I didn’t think much about it and batch renamed all files to their proper form.

But when I ran the next update via gogrepo it wanted to download 64 GB of updates, and 90% of these already exist on my HDD, but aren’t detected because they are named properly.

For some reason gogrepo replaces open and closed parentheses with the ASCII representation of their hex values, %28 instead of ( and %29 instead of ), respectively.

The result of this can be seen in this screenshot.

Apply os and language filters on download

It would be good to be able to download a complete manifest for all versions, then filter the manifest out for the OS/lang on download. I like to keep the windows, extras, and linux files sepearated, but as currently designed, if I want to filter on OS, each OS has to run the update -os foo command separately, which takes upward of 20 minutes on my system per OS.

Unknown threading error

I have two separate copies of GOGRepo, on two separate drives. E: is an internal 2TB platter drive, and I: is an external WD Black 8TB platter drive. There is no other difference.

I can run GOGRepo from E with no issue, but I fails, and I'm not understanding the traceback. I'm hoping someone here can help me. Python 2.7.18 is the only Python I have installed, as I am unable to convert GOGRepo to 3.

E:\GOG Repository>gogrepo.py download -id fates_of_ort
16:39:30 | loading local manifest...
16:39:30 | {fates_of_ort}
16:39:30 |      download   setup_fates_of_ort_1.3.1_(64bit)_(49376).exe
16:39:30 |      download   setup_fates_of_ort_1.3.1_(32bit)_(49376).exe
16:39:30 | ------------------------------------------------------------
16:39:32 |    284.0MB 39.3MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(64bit)_(49376).exe
16:39:32 | 576.3MB remaining
16:39:33 |    278.7MB 20.5MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(32bit)_(49376).exe
16:39:33 |    244.4MB 39.3MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(64bit)_(49376).exe
16:39:33 | 523.1MB remaining
16:39:34 |    257.5MB 20.9MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(32bit)_(49376).exe
16:39:34 |    223.3MB 20.8MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(64bit)_(49376).exe
16:39:34 | 480.8MB remaining
16:39:35 |    237.9MB 19.3MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(32bit)_(49376).exe
16:39:35 |    203.5MB 19.5MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(64bit)_(49376).exe
16:39:35 | 441.4MB remaining
16:39:36 |    218.4MB 19.3MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(32bit)_(49376).exe
16:39:36 |    188.0MB 15.4MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(64bit)_(49376).exe
16:39:36 | 406.4MB remaining
16:39:37 |    193.4MB 24.7MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(32bit)_(49376).exe
16:39:37 |    170.3MB 17.6MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(64bit)_(49376).exe
16:39:37 | 363.6MB remaining
16:39:38 |    162.5MB 30.4MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(32bit)_(49376).exe
16:39:38 |    146.9MB 22.8MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(64bit)_(49376).exe
16:39:38 | 309.5MB remaining
16:39:39 |    125.6MB 36.2MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(32bit)_(49376).exe
16:39:39 |    120.0MB 26.4MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(64bit)_(49376).exe
16:39:39 | 245.5MB remaining
16:39:40 |     85.7MB 39.2MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(32bit)_(49376).exe
16:39:40 |     90.4MB 29.1MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(64bit)_(49376).exe
16:39:40 | 176.1MB remaining
16:39:41 |     53.8MB 31.6MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(32bit)_(49376).exe
16:39:41 |     73.0MB 17.3MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(64bit)_(49376).exe
16:39:41 | 126.7MB remaining
16:39:42 |     24.5MB 28.9MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(32bit)_(49376).exe
16:39:42 |     55.4MB 17.3MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(64bit)_(49376).exe
16:39:42 | 79.9MB remaining
16:39:43 |         0B 29.9MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(32bit)_(49376).exe
16:39:43 |     34.8MB 20.3MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(64bit)_(49376).exe
16:39:43 | 34.8MB remaining
16:39:44 |      9.3MB 25.0MB/s  1x  fates_of_ort/setup_fates_of_ort_1.3.1_(64bit)_(49376).exe
16:39:44 | 9.3MB remaining
16:39:45 | --
16:39:45 | total time: 0:00:15.277000
16:39:45 | exiting...

However, when running the command from I:

I:\Games\GOG Repository>gogrepo.py download -id fates_of_ort
16:39:33 | loading local manifest...
16:39:33 | {fates_of_ort}
16:39:33 |      download   setup_fates_of_ort_1.3.1_(64bit)_(49376).exe
16:39:33 |      download   setup_fates_of_ort_1.3.1_(32bit)_(49376).exe
16:39:33 | ------------------------------------------------------------
Exception in thread Thread-2:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "I:\Games\GOG Repository\gogrepo.py", line 929, in worker
    hdr = page.headers['Content-Range'].split()[-1]
  File "C:\Python27\lib\rfc822.py", line 393, in __getitem__
    return self.dict[name.lower()]
KeyError: u'content-range'

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "I:\Games\GOG Repository\gogrepo.py", line 929, in worker
    hdr = page.headers['Content-Range'].split()[-1]
  File "C:\Python27\lib\rfc822.py", line 393, in __getitem__
    return self.dict[name.lower()]
KeyError: u'content-range'

16:39:36 | --
16:39:36 | total time: 0:00:03.122000
16:39:36 | exiting...

Two null files are generated, but it can't download the data from GOG.

SyntaxError: EOL while scanning string literal

It appears that GOG is returning a multi-line string as part of a changelog, which is causing problems for the script. This occurs using both python2 and python3. The full output of both commands is identical but included below for completeness, in the hope it will be useful. Thanks. :)

$ python2 --version
Python 2.7.16

$ python2 ./gogrepo.py update
05:59:48 | loading local manifest...
05:59:48 | fatal...
Traceback (most recent call last):
  File "./gogrepo.py", line 1170, in <module>
    main(process_argv(sys.argv))
  File "./gogrepo.py", line 1145, in main
    cmd_update(args.os, args.lang, args.skipknown, args.updateonly, args.id)
  File "./gogrepo.py", line 607, in cmd_update
    gamesdb = load_manifest()
  File "./gogrepo.py", line 259, in load_manifest
    return eval(ad)
  File "<string>", line 63508
    '<li>Fixed: an issue with the Force of Nature Cornerstone not taking existing woodcutters into ac
                                                                                                    ^
SyntaxError: EOL while scanning string literal

$ python3 --version
Python 3.7.3

$ python3 ./gogrepo.py update
06:02:55 | loading local manifest...
06:02:55 | fatal...
Traceback (most recent call last):
  File "./gogrepo.py", line 1170, in <module>
    main(process_argv(sys.argv))
  File "./gogrepo.py", line 1145, in main
    cmd_update(args.os, args.lang, args.skipknown, args.updateonly, args.id)
  File "./gogrepo.py", line 607, in cmd_update
    gamesdb = load_manifest()
  File "./gogrepo.py", line 259, in load_manifest
    return eval(ad)
  File "<string>", line 63508
    '<li>Fixed: an issue with the Force of Nature Cornerstone not taking existing woodcutters into ac
                                                                                                    ^
SyntaxError: EOL while scanning string literal

impossible to download multiple languages

What I did:

  • gogrepo.py update -os win linux -lang en de
  • gogrepo.py download [targetdir]

Works nearly perfect, the windows and linux binaries are downloaded, but gogrepo seems to ignore the second language argument. The german version of the binary is never downloaded, not for win or linux.
Thanks for working on this helped me big times. My external drive died and everything downloading again manually ... probably wouldn't have even started...

HTTP Error 403: Forbidden after update -os windows -lang en de -skipknown

Hey there,

i just tried to update my local copy of my gog library with the latest games bought during the current xmas sales but no matter what i try, i always get:

23:58:06 | attempting gog login as '[email protected]' ...
23:58:08 | login successful!
23:58:08 | exiting...

Z:\Software\Games\GOG.com>gogrepo.py update -os windows -lang en de -skipknown
23:58:25 | loading local manifest...
23:58:25 | fetching game product data (page 1)...
23:58:26 | request failed: HTTP Error 403: Forbidden. will not retry.
23:58:26 | fatal...
Traceback (most recent call last):
File "Z:\Software\Games\GOG.com\gogrepo.py", line 1167, in
main(process_argv(sys.argv))
File "Z:\Software\Games\GOG.com\gogrepo.py", line 1142, in main
cmd_update(args.os, args.lang, args.skipknown, args.updateonly, args.id)
File "Z:\Software\Games\GOG.com\gogrepo.py", line 627, in cmd_update
'page': str(i)}, delay=0) as data_request:
File "Z:\Software\Games\GOG.com\gogrepo.py", line 170, in request
page = opener.open(req)
File "C:\Python36\lib\urllib\request.py", line 532, in open
response = meth(req, response)
File "C:\Python36\lib\urllib\request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python36\lib\urllib\request.py", line 570, in error
return self._call_chain(*args)
File "C:\Python36\lib\urllib\request.py", line 504, in _call_chain
result = func(*args)
File "C:\Python36\lib\urllib\request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

Looks like GOG has changed it's API. Any chance to get this working again?
Login and even 2 way auth works just fine, can also verify local files but am unable to fetch my library and/or download new games / updates.

Edited: substituted email with pseudo mail adress ... just in case ...

Enhancement request: treat files that begin "patch_" differently from files that begin "setup_"

GOG doesn't seem to provide a useful way to discriminate between patches (e.g. patch_baldurs_gate_3_whatever_(66683).exe) and full game installers (e.g. setup_baldurs_gate_3_whatever_(67171).exe).

It would be great if gogrepo could process what the file name will be, and be configured to act differently depending on whether it matches one of these patterns. For example, if I simply wish to keep an archive of offline installers, I could configure gogrepo to only download files that begin with "setup_".

HTTP Error 503 with big game library (600+)

gogrepo is running into GOG's IP block you do a

$ gogrepo update

during the MD5 hash download at game 600 or so.

Oh, the whole run did take about 2h (!).

09:12:12 | total time: 2:05:17.007290

Would be cool if you implement incremential updates and cut down the update time :-)

ParseError: not well-formed (invalid token)

Getting errors on certain games when trying to update them.

C:\Users\REMOVED USERNAME\Downloads\GOG Updates>gogrepo.py update -os windows -lang en -id starcrawlers
19:04:15 | loading local manifest...
19:04:15 | fetching game product data (page 1)...
19:04:16 | fetching game product data (page 2 / 16)...
19:04:17 | fetching game product data (page 3 / 16)...
19:04:17 | fetching game product data (page 4 / 16)...
19:04:18 | fetching game product data (page 5 / 16)...
19:04:18 | fetching game product data (page 6 / 16)...
19:04:19 | fetching game product data (page 7 / 16)...
19:04:20 | fetching game product data (page 8 / 16)...
19:04:20 | fetching game product data (page 9 / 16)...
19:04:21 | fetching game product data (page 10 / 16)...
19:04:22 | fetching game product data (page 11 / 16)...
19:04:22 | fetching game product data (page 12 / 16)...
19:04:23 | fetching game product data (page 13 / 16)...
19:04:23 | found "starcrawlers" in product data!
19:04:23 | (1 / 1) fetching game details for starcrawlers...
19:04:28 | error
Traceback (most recent call last):
File "C:\Users\REMOVED USERNAME\Downloads\GOG Updates\gogrepo.py", line 647, in cmd_update
filter_downloads(item.downloads, item_json_data['downloads'], lang_list, os_list)
File "C:\Users\REMOVED USERNAME\Downloads\GOG Updates\gogrepo.py", line 347, in filter_downloads
fetch_file_info(d, True)
File "C:\Users\REMOVED USERNAME\Downloads\GOG Updates\gogrepo.py", line 309, in fetch_file_info
shelf_etree = xml.etree.ElementTree.parse(page).getroot()
File "C:\Program Files (x86)\Python\lib\xml\etree\ElementTree.py", line 1182, in parse
tree.parse(source, parser)
File "C:\Program Files (x86)\Python\lib\xml\etree\ElementTree.py", line 656, in parse
parser.feed(data)
File "C:\Program Files (x86)\Python\lib\xml\etree\ElementTree.py", line 1642, in feed
self._raiseerror(v)
File "C:\Program Files (x86)\Python\lib\xml\etree\ElementTree.py", line 1506, in _raiseerror
raise err
ParseError: not well-formed (invalid token): line 1, column 128

Game download randomly stops

Single game download or complete library download will randomly just stop.
Restarting the script only fixes the problem until it randomly does it again.

[enhancement] Non-Galaxy installers

Somewhat recently, there now exist 2 versions of the installers: one that includes GOG Galaxy bundled, and one without. The current downloader takes the default one, which includes Galaxy. It would be nice to either include the option to ALSO download the non-Galaxy ones or have it be an either-or.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.