Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Results PS5 Amazon-UK #2036

Closed
breacher18 opened this issue Feb 26, 2021 · 13 comments
Closed

Incorrect Results PS5 Amazon-UK #2036

breacher18 opened this issue Feb 26, 2021 · 13 comments

Comments

@breacher18
Copy link

Expected Behavior

return results for PS5 disc or PS5 digital Amazon UK

Current Behavior

results return for PS5 controller Amazon UK

Steps to Reproduce

Capture
success-1614363039350

Environment

  • OS: Windows server 2016
ASCII_BANNER=
ASCII_COLOR=
AUTO_ADD_TO_CART="true"
BROWSER_TRUSTED=
DESKTOP_NOTIFICATIONS=
DISCORD_NOTIFY_GROUP=
DISCORD_NOTIFY_GROUP_SONYPS5C="<@PS5DiscEdition> In Stock Now!"
DISCORD_NOTIFY_GROUP_SONYPS5DE="<@PS5Digital> In Stock Now!"
DISCORD_NOTIFY_GROUP_XBOXSX="<@XboxSeriesX> In Stock Now!"
DISCORD_NOTIFY_GROUP_XBOXSS="<@XboxSseries> In Stock Now!"
DISCORD_WEB_HOOK="https://discordapp.com/api/webhooks/811932893156605962/0hYSrww4buDBITlxm-P384dTsaVRVZ9jbuaZvnuBErKFeReip2gSXXXXXXXXXXXXX"
EMAIL_PASSWORD=
EMAIL_TO=
EMAIL_USERNAME=
HEADLESS="false"
IN_STOCK_WAIT_TIME=
LOG_LEVEL=
LOW_BANDWIDTH="false"
MAX_PRICE_SERIES_SONYPS5C=
MAX_PRICE_SERIES_SONYPS5DE=
MAX_PRICE_SERIES_TEST=
OPEN_BROWSER="false"
PAGE_BACKOFF_MIN="100000"
PAGE_BACKOFF_MAX="120000"
PAGE_SLEEP_MIN="100000"
PAGE_SLEEP_MAX="120000"
PAGE_TIMEOUT="0"
RESTART_TIME=
SCREENSHOT="true"
SHOW_ONLY_BRANDS="sony, microsoft"
SHOW_ONLY_MODELS="ps5 console, ps5 digital, xbox series x, xbox series s"
SHOW_ONLY_SERIES="sonyps5c, sonyps5de, xboxss, xboxsx"
STORES="amazon-uk, argos, currys, ebuyer, game, smythstoys"

Logs

@ordinafdim
Copy link

Got the same issue

@breacher18
Copy link
Author

Got a feeling this is happening with the Xbox links on Amazon-uk too as when I watch the auto navigation in chrome it goes to an Xbox controller page.

@myx360
Copy link

myx360 commented Feb 28, 2021

Yeah same issue here, I'm not sure its possible now to select the ps5 purely through the url (although very happy to be proven wrong), appears it's now necessary to click the console button on the page. Even wishlist links go to the controller. Definitely deliberately done to make it more difficult for bots. On the plus side, because its a relatively easy thing for some bots to overcome, it likely means they'll be putting up ps5 stock this Monday or Tuesday, before anyone can update their bots.

@sucklead
Copy link

sucklead commented Mar 1, 2021

To work around this I've duplicated the maxPrice code as minPrice and check that the price is at least £200.

@khaj21
Copy link

khaj21 commented Mar 1, 2021

To work around this I've duplicated the maxPrice code as minPrice and check that the price is at least £200.

Where can I find the logic about maxPrice?

@breacher18
Copy link
Author

To work around this I've duplicated the maxPrice code as minPrice and check that the price is at least £200.

Where can I find the logic about maxPrice?

Also interested in this

@jef jef closed this as completed in 8ee6815 Mar 2, 2021
@lozbinks
Copy link

lozbinks commented Mar 7, 2021

Unfortunately the specified fix is based on Amazon US and not applicable to the Amazon UK PS5 product page.

@breacher18
Copy link
Author

@lozbinks just apply the code snippet to the Amazonuk store file that’s what I did works great.

@lozbinks
Copy link

lozbinks commented Mar 7, 2021

@breacher18 thank you for you're reply.

I did have a similar approach to that whereas I was searching the edition selector (as per my AmazonUK store ts file snippet below) which I imagine would provide the same result as searching the Product title container in the fix.

However, the AmazonUK ps5 product page auto reverts to the controller unlike the AmazonUS product page so surely it won't be picked up unless the console is clicked/selected from the product options on the page no?

	{
		brand: 'sony',
  			labels: {
    		inStock: {
      		container: '#variation_edition .selection',
      		text: ['Console']
		
		}
	},
		model: 'ps5 console',
		series: 'sonyps5c',
		url: 'https://www.amazon.co.uk/dp/B08H95Y452'
	},

@breacher18
Copy link
Author

breacher18 commented Mar 7, 2021

You changed the container it was looking at? Just use the original container, value “PlayStation 5 Console”

@lozbinks
Copy link

lozbinks commented Mar 7, 2021

That’s the wrong container name

I used that as this was suggested as an earlier fix when the xbox series x console on AmazonDE was coming up as a controller, the same as what the Playstation 5 console is doing now on AmazonUK.

I still have the original instock container left unchanged at the start of the TS file as below

import {Link, Store} from './store';

export const AmazonUk: Store = {
backoffStatusCodes: [403, 429, 503],
currency: '£',
labels: {
captcha: {
container: 'body',
text: ['enter the characters you see below']
},
inStock: {
container: '#availability',
text: ['in stock']
},
maxPrice: {
container: '#priceblock_ourprice'
},
outOfStock: [
{
container: '#availability',
text: ['out of stock', 'unavailable']
},
{
container: '#backInStock',
text: ['unavailable']
}
]
},

So you have had a correct hit on the most recent AmazonUK ps5 drop (March 2nd) using the product title container, even when the page automatically selects the controller instead of the ps5 console from the selectable options when the page is loaded?

@lozbinks
Copy link

lozbinks commented Mar 7, 2021

As you can see when the ps5 console product page loads its the controller that is automatically selected (as bot protection I would assume).

So searching the ProductTitle container as in the fix would surely not be able to detect the value “PlayStation 5 Console” until the console is physically selected from the options on the page?

ps5 amzuk

@breacher18
Copy link
Author

When I watch the navigation it is going to the correct product page. I have removed amazon from my search as after a few tries I just get captcha errors.

erwinc1 pushed a commit to erwinc1/streetmerchant that referenced this issue Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants