updated to new claim layout and removed old comments
This commit is contained in:
parent
3fe0158c48
commit
187ffa0d0c
1 changed files with 3 additions and 5 deletions
|
|
@ -299,8 +299,7 @@ try {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/vogler/free-games-claimer/issues/55
|
// https://github.com/vogler/free-games-claimer/issues/55
|
||||||
//TODO
|
if (cfg.pg_claimdlc) {
|
||||||
if (1) {
|
|
||||||
console.log('Trying to claim in-game content...');
|
console.log('Trying to claim in-game content...');
|
||||||
await page.click('button[data-type="InGameLoot"]');
|
await page.click('button[data-type="InGameLoot"]');
|
||||||
const loot = page.locator('div[data-a-target="offer-list-IN_GAME_LOOT"]');
|
const loot = page.locator('div[data-a-target="offer-list-IN_GAME_LOOT"]');
|
||||||
|
|
@ -326,10 +325,10 @@ try {
|
||||||
const dlcs = await Promise.all(cards.map(async card => ({
|
const dlcs = await Promise.all(cards.map(async card => ({
|
||||||
game: await card.locator('.item-card-details__body p').innerText(),
|
game: await card.locator('.item-card-details__body p').innerText(),
|
||||||
title: await card.locator('.item-card-details__body__primary').innerText(),
|
title: await card.locator('.item-card-details__body__primary').innerText(),
|
||||||
url: "https://gaming.amazon.com" + (await card.locator('a').last().getAttribute("href")),
|
url: "https://gaming.amazon.com" + (await card.locator('a').last().getAttribute("href")),,
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
console.log(dlcs);
|
// console.log(dlcs);
|
||||||
|
|
||||||
const dlc_unlinked = {};
|
const dlc_unlinked = {};
|
||||||
for (const dlc of dlcs) {
|
for (const dlc of dlcs) {
|
||||||
|
|
@ -353,7 +352,6 @@ try {
|
||||||
if (await linkAccountButton.count()) {
|
if (await linkAccountButton.count()) {
|
||||||
unlinked_store = await linkAccountButton.getAttribute("aria-label");
|
unlinked_store = await linkAccountButton.getAttribute("aria-label");
|
||||||
console.debug(` Not able to claim. ${unlinked_store}`);
|
console.debug(` Not able to claim. ${unlinked_store}`);
|
||||||
const match = unlinked_store.match(/Link (.*) account/);
|
|
||||||
} else {
|
} else {
|
||||||
//TODO this needs to be tested
|
//TODO this needs to be tested
|
||||||
//ran out of possible prime offers
|
//ran out of possible prime offers
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue