Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playstation store: monthly games and games catalog #225

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | 0 | 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: process.env.PS_LOCALE || "en-us",
ps_plus_games: process.env.PS_PLUS_GAMES == '1',
ps_game_catalog: process.env.PS_GAME_CATALOG == '1',
ps_classics_catalog: process.env.PS_CLASSICS_CATALOG == '1',
};
Loading
Loading