camtheperson/get-my-ps5

url passed to puppeteer browser wrong for digital edition ps5

Closed this issue · 5 comments

The url passed to puppeteer if the digital edition ps5 is chosen routes to a 404 Page Not Found playstation page. This might not matter since the goal is to look for "queue-it_log" instead of "softblock" but just wanted to note that the urls between ps5 disc and ps5 digital are different besides just the version ID.

@aquafishe Which version are you on? The latest version (1.2.0) uses this URL for the digital edition:

https://direct-queue.playstation.com/?c=sonyied&e=psdirectprodku1&t=https%3A%2F%2Fdirect.playstation.com%2Fen-us%2Fconsoles%2Fconsole%2Fplaystation5-digital-edition-console.3005817&cid=en-US

Just checked and that is not routing to a 404 page for me.

@aquafishe Ah okay, I see what you're saying. This:

const url = `https://direct.playstation.com/en-us/consoles/console/playstation5-console.${version}`;

You are right. So, this should definitely be fixed. Luckily for us, it shouldn't break the bot in the short term, since Sony implements the queue regardless of which page you hit on their store (presumably even the 404 page).

@camtheperson, yes exactly it shouldn't break anything since you don't care what page you end up at. Side note, out of curiosity how did you know to look for 'queue-it_log' in the response?

@aquafishe 'queue-it_log is a CSS class that is present on the queue page, but not on the product page.

This project is no longer maintained. Closing this out.