Closed kennymc-c closed 1 year ago
Ok, just ran it a third time without connected to vnc and 2 of 3 games could be claimed although I just got a notification for one game. Seems similar to #126 But I am not able to claim Baldur's Gate II even when running it multiply times. Strangely enough, unclaimed games are no longer detected. The error does not appear anymore.
Ok, just ran it a third time without connected to vnc and 2 of 3 games could be claimed although I just got a notification for one game. Seems similar to #126 But I am not able to claim Baldur's Gate II even when running it multiply times. Strangely enough, unclaimed games are no longer detected. The error does not appear anymore.
I'm running into this issue where three games (Star Wars, Shovel Knight, Baldurs Gate) are not being detected as unclaimed. Did some testing and noticed the claim-prime-offer-card
locator is not accurate.
I have the page open and there are 43 games showing for me if I scroll all the way down.
See the following results when running in a node --experimental-repl-await
session.
> const games = page.locator('div[data-a-target="offer-list-FGWP_FULL"]');
undefined
> await games.locator('[data-a-target="claim-prime-offer-card"]').count()
33
> await games.locator('.item-card-details--free-game').count()
43
> await games.locator('.item-card-details--free-game').locator('p:has-text("Collected")').count()
40
> await games.locator('.item-card-details--free-game').locator('p:has-text("Claim")').count()
3
Changing the locator to .item-card-details--free-game
gives you the correct count of all free games, but lose out on being able to differentiate between internal/external games.
Here's a diff between two games (internal and external). Looks like the only difference is that external games have a <div class="item-how-to-play">
added so maybe that can be used to differentiate?
Edit:
Looks like the locator for external games is also inaccurate as all games have data-a-target="learn-more-card"
on them so that will need to be updated too.
@OJ7 Thanks for checking, I don't have a lot of time currently.
I noticed the internal/external confusion some time ago here as well and hoped it would sort itself out like the Claim
vs. Claim game
issue.
For me, all internal games still have the button text Claim game
and external games have the text Claim
. Is this the case for you as well? Here someone only had Claim
as text for all buttons.
Looks like the only difference is that external games have a
added so maybe that can be used to differentiate?The selectors are for unclaimed games, whereas
div.item-how-to-play
only exists for claimed external games.Looks like the locator for external games is also inaccurate as all games have data-a-target="learn-more-card" on them so that will need to be updated too.
Yes, the
data-a-target="learn-more-card"
became irrelevant and it was just discerned viatext-is
(external) andhas-text
(internal).
Old internal have data-a-target="claim-prime-offer-card"
+ text Claim game
(or for some people also Claim
).
Old external have data-a-target="learn-more-card"
+ text Claim
.
Last old internal is 'Top Hunter: Roddy & Cathy', first new internal is 'Revita'. For external games, nothing changed ('Prey' vs. 'Gems of Destiny') ?
New internal now no longer have data-a-target="claim-prime-offer-card"
, but seem to have the same structure as external.
Internal old vs. new (both claimed): https://www.diffchecker.com/L9sfiyVF/ External vs. new internal (both unclaimed): https://www.diffchecker.com/HSDlMo3m/
Looks like we can use data-a-target="ExternalOfferClaim"
for external games vs. data-a-target="FGWPOffer"
for internal games.
Seems to work for the old games as well.
Seems to work now:
$ SHOW=1 node prime-gaming.js
2023-07-13 10:54:18.782 started checking prime-gaming
Signed in as Ralf
Number of already claimed games (total): 32
Number of free unclaimed games (Prime Gaming): 6
Current free game: Star Wars: The Force Unleashed
Current free game: Shovel Knight Showdown
Current free game: Baldur's Gate II: Enhanced Edition
Current free game: Cook, Serve, Delicious! 3?!
Current free game: Roguebook
Current free game: Once Upon a Jester
Number of free unclaimed games (external stores): 1
Current free game: Gems of Destiny: Homeless Dwarf
External store: legacy games
Code to redeem game: x-x-x
URL to redeem game: https://promo.legacygames.com/gems-of-destiny-prime-deal/
Trying to redeem x-x-x on legacy games (need to be logged in)!
Redeemed successfully? Please report problems in https://github.com/vogler/free-games-claimer/issues/5
For me, all internal games still have the button text
Claim game
and external games have the textClaim
. Is this the case for you as well? Here someone only hadClaim
as text for all buttons.
I only have internal games available to claim which say Claim game
. However, I feel like I've seen the text changing over the past few weeks (fairly confident I've also seen all of them having the same text as mentioned in that issue).
Looks like we can use data-a-target="ExternalOfferClaim" for external games vs. data-a-target="FGWPOffer" for internal games.
I think that sounds accurate. Just tested the new changes and worked for me, thanks!
Had to run it twice to also claim Nairi but Forced Unleashed was claimed unlike yesterday with the old image
All 3 Amazon Games titles from this week could not be claimed. Only Gems of Destiny from Legacy Games seems to work. I get this error message and also didn't notice anything special when connected via vnc. The process simply aborts halfway through: