Update prime-gaming.js
account for more than one account link button
This commit is contained in:
parent
e06ad3a27f
commit
093ed813c6
1 changed files with 2 additions and 2 deletions
|
|
@ -349,12 +349,12 @@ try {
|
||||||
await page.goto(url, { waitUntil: 'domcontentloaded' });
|
await page.goto(url, { waitUntil: 'domcontentloaded' });
|
||||||
// most games have a button 'Get in-game content'
|
// most games have a button 'Get in-game content'
|
||||||
// epic-games: Fall Guys: Claim -> Continue -> Go to Epic Games (despite account linked and logged into epic-games) -> not tied to account but via some cookie?
|
// epic-games: Fall Guys: Claim -> Continue -> Go to Epic Games (despite account linked and logged into epic-games) -> not tied to account but via some cookie?
|
||||||
await Promise.any([page.click('button:has-text("Get in-game content")'), page.click('button:has-text("Claim your gift")'), page.click('button:has-text("Claim")').then(() => page.click('button:has-text("Continue")'))]);
|
await Promise.any([page.click('.tw-button:has-text("Get in-game content")'), page.click('.tw-button:has-text("Claim your gift")'), page.click('.tw-button:has-text("Claim")').then(() => page.click('button:has-text("Continue")'))]);
|
||||||
page.click('button:has-text("Continue")').catch(_ => { });
|
page.click('button:has-text("Continue")').catch(_ => { });
|
||||||
const linkAccountButton = page.locator('[data-a-target="LinkAccountButton"]');
|
const linkAccountButton = page.locator('[data-a-target="LinkAccountButton"]');
|
||||||
let unlinked_store;
|
let unlinked_store;
|
||||||
if (await linkAccountButton.count()) {
|
if (await linkAccountButton.count()) {
|
||||||
unlinked_store = await linkAccountButton.getAttribute('aria-label');
|
unlinked_store = await linkAccountButton.first().getAttribute('aria-label');
|
||||||
console.debug(' LinkAccountButton label:', unlinked_store);
|
console.debug(' LinkAccountButton label:', unlinked_store);
|
||||||
const match = unlinked_store.match(/Link (.*) account/);
|
const match = unlinked_store.match(/Link (.*) account/);
|
||||||
if (match && match.length == 2) unlinked_store = match[1];
|
if (match && match.length == 2) unlinked_store = match[1];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue