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 el corte ingles #1107

Merged
merged 2 commits into from
Dec 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ environment variables are **optional**._
| Currys (UK) | `currys`|
| Cyberport (DE) | `cyberport` |
| eBuyer (UK) | `ebuyer`|
| El Corte Inglés | `elcorteingles`|
| ePrice (IT) | `eprice`|
| Euronics (IT) | `euronics`|
| Euronics (DE) | `euronics-de`|
Expand Down
69 changes: 69 additions & 0 deletions src/store/model/elcorteingles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import {Store} from './store';

export const Elcorteingles: Store = {
backoffStatusCodes: [403, 429, 503],
labels: {
// Captcha: {
// container: 'body',
// text: [
// 'geben sie die unten angezeigten zeichen ein',
// 'geben sie die zeichen unten ein'
// ]
// },
Comment on lines +6 to +12
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not good? Or does it not come up enough?

inStock: [
{
container: '.product_detail-purchase.mb-2.c12 .js-add-cart-text',
text: ['a la cesta']
}
],
maxPrice: {
container: '.product_detail-buy-price-container .price._big',
euroFormat: true
},
outOfStock: [
{
container:
'.c12.mt-2.product_detail-add_to_cart.one_click_enabled .c12.button._normal.js-buy-button._sold_out.view-page._disabled',
text: ['Agotado']
},
{
container:
'.product_detail-purchase.mb-2.c12 .c12.button._normal.js-buy-button._sold_out.view-page._disabled',
text: ['No disponible']
}
]
},
links: [
{
brand: 'test:brand',
model: 'test:model',
series: 'test:series',
url: 'https://www.elcorteingles.es/moda/A26324406/'
},
{
brand: 'sony',
model: 'ps5 console',
series: 'sonyps5c',
url: 'https://www.elcorteingles.es/videojuegos/A37046604'
},
{
brand: 'sony',
model: 'ps5 digital',
series: 'sonyps5de',
url: 'https://www.elcorteingles.es/videojuegos/A37046605'
},
{
brand: 'microsoft',
model: 'xbox series x',
series: 'xboxsx',
url: 'https://www.elcorteingles.es/videojuegos/A37047078'
},
{
brand: 'microsoft',
model: 'xbox series s',
series: 'xboxss',
url: 'https://www.elcorteingles.es/videojuegos/A37047080'
}
],
name: 'elcorteingles'
};
2 changes: 2 additions & 0 deletions src/store/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {Corsair} from './corsair';
import {Currys} from './currys';
import {Cyberport} from './cyberport';
import {Ebuyer} from './ebuyer';
import {Elcorteingles} from './elcorteingles';
import {Eprice} from './eprice';
import {Euronics} from './euronics';
import {EuronicsDE} from './euronics-de';
Expand Down Expand Up @@ -115,6 +116,7 @@ export const storeList = new Map([
[Currys.name, Currys],
[Cyberport.name, Cyberport],
[Ebuyer.name, Ebuyer],
[Elcorteingles.name, Elcorteingles],
[Eprice.name, Eprice],
[Euronics.name, Euronics],
[EuronicsDE.name, EuronicsDE],
Expand Down