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

feat(store): add MightyApe, NoelLeeming and TheWarehouse (NZ) #2133

Merged
merged 10 commits into from
Apr 9, 2021
3 changes: 3 additions & 0 deletions docs/reference/filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,15 @@ Used with the `STORES` variable.
| Megekko | NL | `megekko`|
| MemoryExpress | CA | `memoryexpress`|
| Micro Center | US | `microcenter`|
| MightyApe | NZ | `mightyape`|
| Mindfactory | DE | `mindfactory` |
| MSY | AU | `msy`|
| Mwave | AU | `mwave`|
| Netonnet | NO | `netonnet-no`|
| Newegg | US | `newegg`|
| Newegg | CA | `newegg-ca`|
| Newegg | SG | `newegg-sg`|
| NoelLeeming | NZ | `noelleeming`|
| Notebooksbilliger | DE |`notebooksbilliger`|
| Novatech | UK | `novatech`|
| Novo Atalho | PT | `novoatalho`|
Expand Down Expand Up @@ -165,6 +167,7 @@ Used with the `STORES` variable.
| Storm Computers | AU | `storm-computer`|
| Target | US | `target`|
| Tesco | IE | `tesco-ie`|
| TheWarehouse | NZ | `thewarehouse`|
| TopAchat | GR | `topachat`|
| Toys R Us | US | `toysrus` |
| Umart | AU | `umart`|
Expand Down
6 changes: 6 additions & 0 deletions src/store/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,15 @@ import {Medimax} from './medimax';
import {Megekko} from './megekko';
import {MemoryExpress} from './memoryexpress';
import {MicroCenter} from './microcenter';
import {MightyApe} from './mightyape';
import {Mindfactory} from './mindfactory';
import {Msy} from './msy';
import {Mwave} from './mwave';
import {NetonnetNO} from './netonnet-no';
import {Newegg} from './newegg';
import {NeweggCa} from './newegg-ca';
import {NeweggSg} from './newegg-sg';
import {NoelLeeming} from './noelleeming';
import {Notebooksbilliger} from './notebooksbilliger';
import {Novatech} from './novatech';
import {NovoAtalho} from './novoatalho';
Expand Down Expand Up @@ -132,6 +134,7 @@ import {Store} from './store';
import {StormComputers} from './storm';
import {Target} from './target';
import {TescoIE} from './tesco-ie';
import {TheWarehouse} from './thewarehouse';
import {TopAchat} from './topachat';
import {ToysRUs} from './toysrus';
import {Umart} from './umart';
Expand Down Expand Up @@ -237,13 +240,15 @@ export const storeList = new Map([
[Ldlc.name, Ldlc],
[MemoryExpress.name, MemoryExpress],
[MicroCenter.name, MicroCenter],
[MightyApe.name, MightyApe],
[Mindfactory.name, Mindfactory],
[Msy.name, Msy],
[Mwave.name, Mwave],
[NetonnetNO.name, NetonnetNO],
[Newegg.name, Newegg],
[NeweggCa.name, NeweggCa],
[NeweggSg.name, NeweggSg],
[NoelLeeming.name, NoelLeeming],
[Notebooksbilliger.name, Notebooksbilliger],
[Novatech.name, Novatech],
[NovoAtalho.name, NovoAtalho],
Expand Down Expand Up @@ -280,6 +285,7 @@ export const storeList = new Map([
[StormComputers.name, StormComputers],
[Target.name, Target],
[TescoIE.name, TescoIE],
[TheWarehouse.name, TheWarehouse],
[TopAchat.name, TopAchat],
[ToysRUs.name, ToysRUs],
[Umart.name, Umart],
Expand Down
51 changes: 51 additions & 0 deletions src/store/model/mightyape.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import {Store} from './store';

export const MightyApe: Store = {
currency: '$',
labels: {
inStock: [
{
container:
'body > div.page-container > div.page.listing.details.not-in-trolley.category.category-games.category-controllers > div > main > section.product-summary-top > div > div > div.product-summary > div.trolley-button-and-product-options > div.trolley-button-section > div.purchase-options > form > div > button',
text: ['Add to Trolley'],
},
],
outOfStock: [
{
container:
'body > div.page-container > div.page.listing.details.not-in-trolley.category.category-games.category-ps5-consoles > div > main > section.product-summary-top > div > div > div.product-summary.unavailable > div.pricing-stock > div > div.status',
text: [' Unavailable '],
},
],
},
links: [
{
brand: 'sony',
model: 'ps5 console',
series: 'sonyps5c',
url:
'https://www.mightyape.co.nz/product/sony-playstation-5-console/31675007',
},
{
brand: 'sony',
model: 'ps5 digital',
series: 'sonyps5de',
url:
'https://www.mightyape.co.nz/product/sony-playstation-5-digital-edition-console/33505481',
},
{
brand: 'microsoft',
model: 'xbox series x',
series: 'xboxsx',
url: 'https://www.mightyape.co.nz/product/xbox-series-x-console/30472387',
},
{
brand: 'microsoft',
model: 'xbox series s',
series: 'xboxss',
url:
'https://www.mightyape.co.nz/product/xbox-series-s-all-digital-console/33856647',
},
],
name: 'mightyape',
};
41 changes: 41 additions & 0 deletions src/store/model/noelleeming.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import {Store} from './store';

export const NoelLeeming: Store = {
currency: '$',
labels: {
inStock: [
{
container:
'#bd > div.product__hero > div > div.columns.product__info.medium-6.small-12 > div.product__price-cart.mbs.row > div:nth-child(3) > div > div.product__cta-buttons.columns.small-12 > form > button > strong',
text: ['Buy Now'],
},
],
},
links: [
{
brand: 'sony',
model: 'ps5 console',
series: 'sonyps5c',
url: 'https://www.noelleeming.co.nz/prod192865.html',
},
{
brand: 'sony',
model: 'ps5 digital',
series: 'sonyps5de',
url: 'https://www.noelleeming.co.nz/prod192879.html',
},
{
brand: 'microsoft',
model: 'xbox series x',
series: 'xboxsx',
url: 'https://www.noelleeming.co.nz/prod193770.html',
},
{
brand: 'microsoft',
model: 'xbox series s',
series: 'xboxss',
url: 'https://www.noelleeming.co.nz/prod200475.html',
},
],
name: 'noelleeming',
};
51 changes: 51 additions & 0 deletions src/store/model/thewarehouse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import {Store} from './store';

export const TheWarehouse: Store = {
currency: '$',
labels: {
inStock: {
container:
'#maincontent > div.container.product-detail.product-wrapper.pb-xl.pb-lg-xxxl > div > div:nth-child(2) > div.col-12.col-md-6.col-lg-5 > div > div.product-buying-box > div.cart-and-ipay.mt-md > div > div > button > span',
text: ['Add to Cart', 'Find in Store'],
},
outOfStock: [
{
container:
'#maincontent > div.container.product-detail.product-wrapper.pb-xl.pb-lg-xxxl > div > div:nth-child(2) > div.col-12.col-md-6.col-lg-5 > div > div.product-buying-box > div.cart-and-ipay.mt-md > div > div > button > span',
text: ['Out of Stock'],
},
{
container:
'#maincontent > div.container.product-detail.product-wrapper.pb-xl.pb-lg-xxxl > div > div:nth-child(2) > div.col-12.col-md-6.col-lg-5 > div > div.product-buying-box > div.cart-and-ipay.mt-md > div > div > div > div',
text: ['Out of Stock'],
},
],
},
links: [
{
brand: 'sony',
model: 'ps5 console',
series: 'sonyps5c',
url: 'https://www.thewarehouse.co.nz/R2695122.html',
},
{
brand: 'sony',
model: 'ps5 digital',
series: 'sonyps5de',
url: 'https://www.thewarehouse.co.nz/R2695123.html',
},
{
brand: 'microsoft',
model: 'xbox series x',
series: 'xboxsx',
url: 'https://www.thewarehouse.co.nz/R2708605.html',
},
{
brand: 'microsoft',
model: 'xbox series s',
series: 'xboxss',
url: 'https://www.thewarehouse.co.nz/R2708604.html',
},
],
name: 'thewarehouse',
};