Commit graph

124 commits

Author SHA1 Message Date
Jannis Hell
093ed813c6
Update prime-gaming.js
account for more than one account link button
2023-12-23 11:55:27 +01:00
Jannis Hell
e06ad3a27f
use tw-button css class over button html element selector 2023-12-22 16:40:02 +01:00
Jannis Hell
f4270e176f Update prime-gaming.js
The button was renamed to "Claim" instead of "Claim now" this causes / fixes #208
2023-12-20 20:55:14 +01:00
Ralf Vogler
3c15252d8b pg: use chalk to color game codes blue, closes #250 2023-12-19 12:06:15 +01:00
Ralf Vogler
0832ae57f5 run eslint --fix . 2023-11-08 01:16:49 +01:00
Ralf Vogler
e4e4f2eafa fix eslint errors 2023-11-07 18:10:22 +01:00
Ralf Vogler
e5935faa13 sonarcloud fixes 2023-11-07 15:20:58 +01:00
Ralf Vogler
b99a154267 Revert "workaround for recordVideo broken in Playwright 1.36"
This reverts commit 13b2917dd0.

Fine to do after upgrade to 1.39 in 75f7d77445.
which included https://github.com/microsoft/playwright/issues/27086
2023-11-02 16:26:45 +01:00
Ralf Vogler
ad2301c3fd pg: eg: fix detecting successful claim 2023-10-10 22:42:38 +02:00
Ralf Vogler
a8ab989a7f pg: external: check for 'Link account' besides 'Link game account' 2023-10-10 22:12:59 +02:00
Ralf Vogler
9fc68b881f pg: legacygames: don't wait for response, just text 2023-10-10 22:01:23 +02:00
Ralf Vogler
41f1f95509 PW: replace deprecated type() with pressSequentially() for OTPs 2023-09-18 14:02:15 +02:00
Ralf Vogler
13b2917dd0 workaround for recordVideo broken in Playwright 1.36
Recording videos with relative path as in docs was broken for Firefox.
Issue: https://github.com/microsoft/playwright/issues/27086
Can be reverted after PR is available in release: https://github.com/microsoft/playwright/pull/27099
2023-09-18 13:03:04 +02:00
Ralf Vogler
b748460b73 disable Playwright's handleSIGINT and close context ourselves to save recordings also on SIGINT 2023-09-18 12:58:20 +02:00
Ralf Vogler
1fbabbc0f2 log path of recorded video 2023-09-18 12:49:23 +02:00
Ralf Vogler
b449ee4d7f pg: redeem: legacygames success/error 2023-09-05 16:12:20 +02:00
Ralf Vogler
d4ebdd091a pg: log current game in claim loop, not data loop 2023-09-05 15:59:17 +02:00
Ralf Vogler
d8e2093a0d pg: INTERACTIVE=1 to confirm each claim or skip it 2023-09-05 15:56:24 +02:00
Ralf Vogler
6a7cca31a4 update dependencies via ncu -u, lowdb: pass defaultData
dotenv                          ^16.0.3  →  ^16.3.1
  enquirer                         ^2.3.6  →   ^2.4.1
  lowdb                            ^5.1.0  →   ^6.0.1
  playwright-firefox              ^1.31.0  →  ^1.37.1
  puppeteer-extra-plugin-stealth  ^2.11.1  →  ^2.11.2

https://github.com/typicode/lowdb/releases/tag/v6.0.0
> Require defaultData parameter for Low and LowSync constructors to improve TypeScript experience
2023-08-24 13:14:39 +02:00
Ralf Vogler
3d1168f653 pg: external: split loop for URLs to avoid issue with changed elementHandles (Page.adoptNode) 2023-08-23 00:51:19 +02:00
Ralf Vogler
40bcf1c8a2 pg: status 'claimed' (not just 'claimed and redeemed') for external stores 2023-08-23 00:09:27 +02:00
Ralf Vogler
7551a6ca96 pg: fixup e2e28301e6? 2023-08-19 17:04:33 +02:00
Ralf Vogler
e2e28301e6 pg: fix #185? 2023-08-19 16:35:58 +02:00
Ralf Vogler
e794a3306f pg: dlc: grouped list of dlcs per unlinked store, #180 2023-08-17 17:02:47 +02:00
Ralf Vogler
5c8f8fc3fd pg: dlc: log url of dlc if account not linked, #180 2023-08-17 16:44:59 +02:00
Ralf Vogler
86832e7fe9 pg: dlc: log url of dlc if account not linked, #180 2023-08-17 16:43:47 +02:00
Ralf Vogler
d0761dea26 pg: dlc: account linking: mention store, close #180 2023-08-17 16:37:05 +02:00
Ralf Vogler
b5ead8ea21 SCREENSHOTS_DIR=0 to disable screenshots, fixes #172 2023-07-20 16:10:50 +02:00
Ralf Vogler
22f673282b pg: fix a90f90afc0 2023-07-13 11:30:48 +02:00
Ralf Vogler
a90f90afc0 pg: PG_REDEEM: only pause if DEBUG=1
Fixes https://github.com/vogler/free-games-claimer/issues/5#issuecomment-1527063819
2023-07-13 11:28:18 +02:00
Ralf Vogler
2e8a731573 pg: update selectors for internal/external games, fixes #164 2023-07-13 10:56:12 +02:00
Ralf Vogler
04bd56cd77 pg: legacy games: status = claimed and redeemed 2023-07-06 16:48:07 +02:00
Ralf Vogler
f0e15b5c7c pg: fix #158 - page for gog (and ?) changed (button, store, code)
The claim page for Legacy Games is still unchanged and works with the
old code.
2023-06-23 01:24:06 +02:00
Ralf Vogler
85513031f2 pg: external: fix lost elementHandle error due to navigation
elementHandle.$: Protocol error (Page.adoptNode)
2023-06-23 01:21:42 +02:00
Ralf Vogler
0b9d5d0b63 pg: comments 2023-06-22 17:16:35 +02:00
Ralf Vogler
feadfc5acf pg: redeem: gog: status = 'claimed and redeemed' 2023-05-18 18:02:11 +02:00
Ralf Vogler
7fb872608d pg: dlc: try/catch for each dlc, #55 2023-05-18 17:32:02 +02:00
Ralf Vogler
0d074d0397 pg: dlc: scroll to end of page until all are loaded, #55 2023-05-18 16:03:24 +02:00
Ralf Vogler
368229be09 pg: screenshot prep only if needed 2023-05-17 11:35:10 +02:00
Ralf Vogler
8ee63c7a35 pg: support RECORD=1 2023-05-17 11:29:45 +02:00
Ralf Vogler
819e4cc57e pg: PG_REDEEM tested legacy games successfully, #5 2023-05-17 11:28:31 +02:00
Ralf Vogler
e4ebae3744 pg: PG_REDEEM, fixes for gog, #5 2023-05-17 11:15:07 +02:00
Ralf Vogler
240e64ae4c pg: also use elementHandles() for external 2023-05-17 10:20:17 +02:00
Ralf Vogler
98e4145708 Merge branch 'main' into refactor/prime-gaming 2023-05-17 00:59:44 +02:00
Ralf Vogler
60acf747d0 pg: scroll to bottom to load all games
There may be so many unclaimed games that not all of them are loaded
initially.
Also relevant to show the correct number of collected games.
2023-05-17 00:55:58 +02:00
Ralf Vogler
c4eb1e03ce pg: need elementHandles() instead of all() for internal since it changes 2023-05-17 00:41:37 +02:00
Ralf Vogler
590b01aba2 pg: refactor: use more locators & all() instead of $ 2023-05-17 00:11:35 +02:00
Ralf Vogler
290fe289d4 pg: fix #142: PG_CLAIMDLC locator 'a' resolved to 2 elements 2023-05-16 13:31:53 +02:00
Ralf Vogler
491ee899a5 pg: #126 change selector to handle potential button text 'Claim' (instead of 'Claim game') for internal games 2023-05-11 19:00:43 +02:00
Ralf Vogler
351bf00c7b pg: redeem gog: fix for undefined reason in response, #5 2023-04-14 11:59:33 +02:00