Skip to content

Commit

Permalink
fix(amazon): false positives for xbox (#2497)
Browse files Browse the repository at this point in the history
Utilizes product specific labels to reduce false positives on Xbox X
  • Loading branch information
Onind committed May 6, 2021
1 parent 7c4c6ed commit 790fe9b
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 6 deletions.
12 changes: 12 additions & 0 deletions src/store/model/amazon-ca.ts
Expand Up @@ -264,6 +264,12 @@ export const AmazonCa: Store = {
brand: 'microsoft',
cartUrl:
'https://www.amazon.ca/gp/aws/cart/add.html?ASIN.1=B08H75RTZ8&Quantity.1=1',
labels: {
inStock: {
container: '#productTitle',
text: ['Xbox Series X'],
},
},
model: 'xbox series x',
series: 'xboxsx',
url: 'https://www.amazon.ca/dp/B08H75RTZ8',
Expand All @@ -272,6 +278,12 @@ export const AmazonCa: Store = {
brand: 'microsoft',
cartUrl:
'https://www.amazon.ca/gp/aws/cart/add.html?ASIN.1=B08G9J44ZN&Quantity.1=1',
labels: {
inStock: {
container: '#productTitle',
text: ['Xbox Series S'],
},
},
model: 'xbox series s',
series: 'xboxss',
url: 'https://www.amazon.ca/dp/B08G9J44ZN',
Expand Down
22 changes: 16 additions & 6 deletions src/store/model/amazon-de.ts
Expand Up @@ -537,18 +537,28 @@ export const AmazonDe: Store = {
},
{
brand: 'microsoft',
// Fixme: disabled because of #1095, enable when working again
// cartUrl:
// 'https://www.amazon.de/gp/aws/cart/add.html?ASIN.1=B08H93ZRLL&Quantity.1=1',
cartUrl:
'https://www.amazon.de/gp/aws/cart/add.html?ASIN.1=B08H93ZRLL&Quantity.1=1',
labels: {
inStock: {
container: '#productTitle',
text: ['Xbox Series X'],
},
},
model: 'xbox series x',
series: 'xboxsx',
url: 'https://www.amazon.de/dp/B08H93ZRLL',
},
{
brand: 'microsoft',
// Fixme: disabled because of #1095, enable when working again
// cartUrl:
// 'https://www.amazon.de/gp/aws/cart/add.html?ASIN.1=B087VM5XC6&Quantity.1=1',
cartUrl:
'https://www.amazon.de/gp/aws/cart/add.html?ASIN.1=B087VM5XC6&Quantity.1=1',
labels: {
inStock: {
container: '#productTitle',
text: ['Xbox Series S'],
},
},
model: 'xbox series s',
series: 'xboxss',
url: 'https://www.amazon.de/dp/B087VM5XC6',
Expand Down
12 changes: 12 additions & 0 deletions src/store/model/amazon.ts
Expand Up @@ -741,12 +741,24 @@ export const Amazon: Store = {
},
{
brand: 'microsoft',
labels: {
inStock: {
container: '#productTitle',
text: ['Xbox Series X'],
},
},
model: 'xbox series x',
series: 'xboxsx',
url: 'https://www.amazon.com/dp/B08H75RTZ8',
},
{
brand: 'microsoft',
labels: {
inStock: {
container: '#productTitle',
text: ['Xbox Series S'],
},
},
model: 'xbox series s',
series: 'xboxss',
url: 'https://www.amazon.com/dp/B08G9J44ZN',
Expand Down

0 comments on commit 790fe9b

Please sign in to comment.