Giter VIP home page Giter VIP logo

Comments (14)

MattMills avatar MattMills commented on September 27, 2024 3

Fyi @eddie3 I commented out the code that checks for the recaptcha div and it logged me in fine, so I'd say looking for that div is not a valid way to determine if they're asking for a captcha.

from gogrepo.

CalAlaera avatar CalAlaera commented on September 27, 2024 2

@CalAlaera Your dates are epoch encoded. Try putting the plaintext ones instead: "11-08-2022 6:26:27Z" "04-08-2022 09:36:05Z"

Bingo, this appears to have fixed the problem, I am currently running an update and it appears to be working perfectly now.

It turns out I needed to use the format "2023-08-04 06:08:16". I set all my cookies with that expiry, and it didn't work. I then duplicated all my cookies and changed the domain on the second copy to precisely "gog.com", and suddenly, it's working.

Just in case it helps anyone else with a similar problem, my gog-cookies.dat file now looks like this (values redacted for obvious reasons):

#LWP-Cookies-2.0
Set-Cookie3: _abck=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0
Set-Cookie3: ak_bmsc=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0
Set-Cookie3: bm_sv=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0
Set-Cookie3: bm_sz=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0
Set-Cookie3: cart_token=<redacted>; path="/"; domain=.gog.com; path_spec; expires="0"; version=0
Set-Cookie3: csrf=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0
Set-Cookie3: gog_lc=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0
Set-Cookie3: gog_us=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0
Set-Cookie3: gog-al=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0
Set-Cookie3: _abck=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0
Set-Cookie3: ak_bmsc=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0
Set-Cookie3: bm_sv=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0
Set-Cookie3: bm_sz=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0
Set-Cookie3: cart_token=<redacted>; path="/"; domain=gog.com; path_spec; expires="0"; version=0
Set-Cookie3: csrf=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0
Set-Cookie3: gog_lc=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0
Set-Cookie3: gog_us=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0
Set-Cookie3: gog-al=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-08-04 06:08:16"; version=0

Thanks for your help. :)

Edited to add: Yes, this has absolutely fixed the problem, the script is now working perfectly. Thanks again. :)

from gogrepo.

eddie3 avatar eddie3 commented on September 27, 2024

Hi. If you import them from your web browser after you've logged in, it should work.

from gogrepo.

oriwheb avatar oriwheb commented on September 27, 2024

And it does. I'm just wondering if this is fixable... Maybe change the login function to a cookie import one?
Maybe that's a bit too involved.

from gogrepo.

CalAlaera avatar CalAlaera commented on September 27, 2024

Hi. If you import them from your web browser after you've logged in, it should work.

This didn't fix the problem for me. I copied my cookies from my web browser into gog-cookies.dat as instructed (incidentally, they did look rather different, no mention of Galaxy in my browser's cookiejar, but anyway), and I get the following output:


$ python3 ./gogrepo.py -v
gogrepo.py (version 0.3a)
$ python3 ./gogrepo.py update
07:30:10 | loading local manifest...
07:30:10 | fetching game product data (page 1)...
07:30:11 | failed to load product data (are you still logged in?)
$ python3 ./gogrepo.py login
Username: <redacted>
Password:
07:31:08 | attempting gog login as '<redacted>' ...
07:31:13 | cannot continue, gog is asking for a reCAPTCHA :(  try again in a few minutes.
07:31:13 | exiting...
$

from gogrepo.

oriwheb avatar oriwheb commented on September 27, 2024

Did you use an extension to export the cookie?

My easy guess is that you entered the data in the wrong format, and not the format the script expects and can handle.

from gogrepo.

CalAlaera avatar CalAlaera commented on September 27, 2024

Did you use an extension to export the cookie?

Not at first - I transferred them manually.

I have just tried again with EditThisCookie, exporting into LWP format as expected by the script. The exported cookies look like this:

Set-Cookie3: csrf=true; path="/"; domain=.gog.com; path_spec; expires="1660199187.824337"; version=0
Set-Cookie3: gog_lc=GB_GBP_en-US; path="/"; domain=.gog.com; path_spec; expires="1691130419.40648"; version=0

and so on. Same result.

from gogrepo.

DerPit avatar DerPit commented on September 27, 2024

My browser shows me two possible cookies, one for www.gog.com, and one for gog.com. You need the latter, for gog.com.
I use Extension 'Export Cookies' (for Chrome/Vivaldi), and a perl script to convert

from gogrepo.

CalAlaera avatar CalAlaera commented on September 27, 2024

My browser shows me two possible cookies, one for www.gog.com, and one for gog.com. You need the latter, for gog.com. I use Extension 'Export Cookies' (for Chrome/Vivaldi), and a perl script to convert

I wasn't able to find the extension you mentioned in the Chrome extension store. However, I am fairly confident that this isn't the problem. I have now tried www.gog.com, .gog.com, and even copying all the cookies and editing the domain name to just plain gog.com with and without the leading dot. I also tried exporting my cookies in Mozilla cookies.txt format, which the script says it can handle (nice feature, by the way), and I started getting weird errors from cookiejar.py.

I've logged out and back in in my browser to refresh my cookies (notably, I wasn't asked to complete a captcha).

If someone would be willing to provide their working gog-cookies.dat (with the keys intact but values redacted for obvious reasons), I could adjust my own to match, and try it that way?

from gogrepo.

oriwheb avatar oriwheb commented on September 27, 2024

What worked for me was copying just the token values and expiration dates into the cookie .dat file.

@CalAlaera Your dates are epoch encoded. Try using the plaintext ones instead:
"11-08-2022 6:26:27Z"
"04-08-2022 09:36:05Z"

Convert your other dates as well here.

from gogrepo.

x2601 avatar x2601 commented on September 27, 2024

Odd. I followed the instructions including converting the date format and adding the just "gog.com" domain copies, but it's still prompting me for the reCAPTCHA.

#LWP-Cookies-2.0
Set-Cookie3: _abck=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: ak_bmsc=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: bm_mi=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: bm_sv=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: bm_sz=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: cart_token=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: csrf=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: gog_lc=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: gog_us=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: gog-al=<redacted>; path="/"; domain=.gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: _abck=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: ak_bmsc=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: bm_mi=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: bm_sv=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: bm_sz=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: cart_token=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: csrf=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: gog_lc=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: gog_us=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0
Set-Cookie3: gog-al=<redacted>; path="/"; domain=gog.com; path_spec; expires="2023-09-16 10:09:52"; version=0

from gogrepo.

x2601 avatar x2601 commented on September 27, 2024

Fyi @eddie3 I commented out the code that checks for the recaptcha div and it logged me in fine, so I'd say looking for that div is not a valid way to determine if they're asking for a captcha.

This also worked for me.

from gogrepo.

Avatar007z avatar Avatar007z commented on September 27, 2024

Commenting out the div lookup for reCAPTCHA solved the issue for me. Otherwise I was going down the rabbit hole of exporting and modifying cookies.

from gogrepo.

eddie3 avatar eddie3 commented on September 27, 2024

Thanks! I've removed the check for now and will revisit in the future.

from gogrepo.

Related Issues (20)

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.