Skip to content

Commit

Permalink
Playstation store: monthly games and games catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
4n4n4s committed Sep 24, 2023
1 parent 9ebd15f commit ac1a1fb
Show file tree
Hide file tree
Showing 3 changed files with 435 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Claims free games periodically on
- <img src="https://static.wikia.nocookie.net/this-war-of-mine/images/1/1a/Logo_GoG.png/revision/latest?cb=20160711062658" width="32"/> [GOG](https://www.gog.com)
- <img src="https://www.freepnglogos.com/uploads/xbox-logo-picture-png-14.png" width="32"/> [Xbox Live Games with Gold](https://www.xbox.com/en-US/live/gold#gameswithgold) - planned
- <img src="https://cdn2.unrealengine.com/ue-logo-white-e34b6ba9383f.svg" width="32"/> [Unreal Engine (Assets)](https://www.unrealengine.com/marketplace/en-US/assets?count=20&sortBy=effectiveDate&sortDir=DESC&start=0&tag=4910) ([experimental](https://github.com/vogler/free-games-claimer/issues/44), same login as Epic Games)
- <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/PlayStation_logo.svg/400px-PlayStation_logo.svg.png" width="32"/> [PlayStation](https://www.playstation.com/en-us/ps-plus/whats-new/#monthly-games) - experimental

Pull requests welcome :)

Expand Down Expand Up @@ -87,6 +88,14 @@ Available options/variables and their default values:
| GOG_EMAIL | | GOG email for login. Overrides EMAIL. |
| GOG_PASSWORD | | GOG password for login. Overrides PASSWORD. |
| GOG_NEWSLETTER | 0 | Do not unsubscribe from newsletter after claiming a game if 1. |
| PS_EMAIL | | PlayStation email for login. Overrides EMAIL. |
| PS_PASSWORD | | PlayStation password for login. Overrides PASSWORD. |
| PS_OTPKEY | | PlayStation MFA OTP key. |
| PS_LOCALE | en-us | Configurable locale to use the store. Examples are en-us, en-gb, de-at, ... |
| PS_PLUS_GAMES | 1 | Claim monthly ps plus games. Requires PS Plus Essential or higher subscription. |
| PS_GAME_CATALOG | 0 | Claim over 400 game catalog games. Requires PS Extra or higher. |
| PS_CLASSICS_CATALOG | 0 | Currently not implemented! Requires PS Extra or higher. |


See `config.js` for all options.

Expand Down Expand Up @@ -114,6 +123,7 @@ To get the OTP key, it is easiest to follow the store's guide for adding an auth
- **Epic Games**: visit [password & security](https://www.epicgames.com/account/password), enable 'third-party authenticator app', copy the 'Manual Entry Key' and use it to set `EG_OTPKEY`.
- **Prime Gaming**: visit Amazon 'Your Account › Login & security', 2-step verification › Manage › Add new app › Can't scan the barcode, copy the bold key and use it to set `PG_OTPKEY`
- **GOG**: only offers OTP via email
- **PlayStation**: visit [account settings](https://id.sonyentertainmentnetwork.com/id/management_ca/?smcid=pdc%3Aen-us%3Aweb-toolbar-account%3Aaccount%20settings) > Security > 'edit' 2-Step Verification > Authenticator App > copy the key and use it to set `PS_OTPKEY`. Note: If you have SMS or another auth setup you need to switch to an Authenticator App like Duo.

Beware that storing passwords and OTP keys as clear text may be a security risk. Use a unique/generated password! TODO: maybe at least offer to base64 encode for storage.

Expand All @@ -131,12 +141,17 @@ Claiming the Amazon Games works out-of-the-box, however, for games on external s
Keys and URLs are printed to the console, included in notifications and saved in `data/prime-gaming.json`. A screenshot of the page with the key is also saved to `data/screenshots`.
[TODO](https://github.com/vogler/free-games-claimer/issues/5): ~~redeem keys on external stores.~~


### PlayStation
Run `node playstation` (locally or in Docker).

### Run periodically
#### How often?
Epic Games usually has two free games *every week*, before Christmas every day.
Prime Gaming has new games *every month* or more often during Prime days.
GOG usually has one new game every couples of weeks.
Unreal Engine has new assets to claim *every first Tuesday of a month*.
PlayStation releases 2-3 new games on a monthly basis for PlayStation Plus Essential.

It is save to run the scripts every day.

Expand Down
9 changes: 9 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,13 @@ export const cfg = {
// experimmental - likely to change
pg_redeem: process.env.PG_REDEEM == '1', // prime-gaming: redeem keys on external stores
pg_claimdlc: process.env.PG_CLAIMDLC == '1', // prime-gaming: claim in-game content

// playstation
ps_email: process.env.PS_EMAIL || process.env.EMAIL,
ps_password: process.env.PS_PASSWORD || process.env.PASSWORD,
ps_otpkey: process.env.PS_OTPKEY,
ps_locale: "en-us" || process.env.PS_LOCALE,
ps_plus_games: true || process.env.PS_PLUS_GAMES == '1',
ps_game_catalog: false || process.env.PS_GAME_CATALOG == '1',
ps_classics_catalog: false || process.env.PS_CLASSICS_CATALOG == '1',
};
Loading

0 comments on commit ac1a1fb

Please sign in to comment.