restored few lines of original code
This commit is contained in:
parent
0e146860cf
commit
ae2df94f59
1 changed files with 5 additions and 3 deletions
|
|
@ -329,7 +329,7 @@ try {
|
||||||
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) {
|
||||||
|
|
@ -354,6 +354,9 @@ try {
|
||||||
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/);
|
const match = unlinked_store.match(/Link (.*) account/);
|
||||||
|
if (match && match.length == 2) unlinked_store = match[1];
|
||||||
|
dlc_unlinked[unlinked_store] ??= [];
|
||||||
|
dlc_unlinked[unlinked_store].push(title);
|
||||||
} 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
|
||||||
|
|
@ -374,8 +377,7 @@ try {
|
||||||
await page.click('button[data-type="InGameLoot"]');
|
await page.click('button[data-type="InGameLoot"]');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO
|
console.log("DLC: Unlinked accounts:", dlc_unlinked);
|
||||||
// console.log("DLC: Unlinked accounts:", dlc_unlinked);
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
process.exitCode ||= 1;
|
process.exitCode ||= 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue