Johny.: 1. Probably your whole cookie is lowercase (country part is tolerated as lowercase). I don't know why. For me changing cookie works. (editThisCookie Chrome addon)
2. Check this endpoint
https://www.gog.com/user/changeCurrency/USD - it will change the currency part of the cookie for you. Probably you would need a little refactor to wait for a callback then.
Thank you for replying (here and via chat).
I will post a detailed description of everything I do in a new thread sometime tonight, but briefly what I do is:
my $browser = LWP::UserAgent->new(); #browser-like object
my $cookie_jar = HTTP::Cookies->new() ; #container for cookies
$browser->cookie_jar($cookie_jar);
$cookie_jar->set_cookie(0, "gog_lc", "US_USD_en", "/", ".gog.com", 80, 0, 0, 86400, 0);
$ctlg = $browser->get("
http://www.gog.com/games/ajax/filtered?mediaType=game&page=1&sort=title")->content();
I tried with http and with https. In both cases, the data I receive is ok (no error), but the data is unaffected by the cookie (i.e. data is for CA_USD_en).
At a later point, I change the country (e.g. new cookie with DE_USD_en, GB_USD_en, AR_USD_en, etc.), but everything remains CA.
At an even later point, I change the language (e.g. new cookie with US_USD_fr, US_USD_ru, etc.), but everything remains en.
I never change the currency part. I always use USD.
This code hasn't changed in months and worked well until yesterday. I can say that it still worked fine on 15 March 07:00-08:00 (Poland time) and did not work any more since 15 March 13:00-14:00 (Poland time).
P.S. The prototype for set_cookie is:
$cookie_jar->set_cookie($version, $key, $val, $path, $domain, $port, $path_spec, $secure, $maxage, $discard)
Cheers. See above.