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 Nov 10, 2023
1 parent 4231b7d commit ae9e79a
Show file tree
Hide file tree
Showing 3 changed files with 434 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,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://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://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) ([experimental](https://github.com/vogler/free-games-claimer/issues/19)) -->
- <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 @@ -92,6 +93,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 @@ -120,6 +129,7 @@ To get the OTP key, it is easiest to follow the store's guide for adding an auth
- **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
<!-- - **Xbox**: visit [additional security](https://account.live.com/proofs/manage/additional) > Add a new way to sign in or verify > Use an app > Set up a different Authenticator app > I can't scan the bar code > copy the bold key and use it to set `XBOX_OTPKEY` -->
- **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 @@ -140,13 +150,17 @@ Claiming the Amazon Games works out-of-the-box, however, for games on external s
<!-- ### Xbox Games With Gold -->
<!-- Run `node xbox` (locally or in docker). -->

### 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*.
<!-- Xbox usually has two games *every month*. -->
PlayStation releases 2-3 new games on a monthly basis for PlayStation Plus Essential.

It is safe 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 @@ -48,4 +48,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 ae9e79a

Please sign in to comment.