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 mediamarkt austria #1836

Merged
merged 7 commits into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/store/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ import {JohnLewis} from './johnlewis';
import {Kabum} from './kabum';
import {LandmarkComputers} from './lmc';
import {Mediamarkt} from './mediamarkt';
import {MediamarktAt} from './mediamarkt-at';
import {Medimax} from './medimax';
import {Megekko} from './megekko';
import {MemoryExpress} from './memoryexpress';
Expand Down Expand Up @@ -214,6 +215,7 @@ export const storeList = new Map([
[Kabum.name, Kabum],
[LandmarkComputers.name, LandmarkComputers],
[Mediamarkt.name, Mediamarkt],
[MediamarktAt.name, MediamarktAt],
[Medimax.name, Medimax],
[Megekko.name, Megekko],
[MemoryExpress.name, MemoryExpress],
Expand Down
96 changes: 96 additions & 0 deletions src/store/model/mediamarkt-at.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import {Store} from './store';

export const MediamarktAt: Store = {
backoffStatusCodes: [403, 429, 503],
currency: '€',
labels: {
captcha: {
container: 'p',
text: ['Das ging uns leider zu schnell.'],
},
maxPrice: {
container: 'span[font-family="price"]',
euroFormat: false,
},
outOfStock: [
{
container: '#root',
text: ['Dieser Artikel ist aktuell nicht verfügbar.'],
},
{
container: '#root',
text: ['Leider keine Lieferung möglich'],
},
{
container: '#root',
text: ['Nicht verfügbar'],
},
{
container: '#root',
text: ['Dieser Artikel ist dauerhaft ausverkauft'],
},
{
container: '#root',
text: ['Dieser Artikel ist bald wieder für Sie verfügbar'],
},
],
},
links: [
{
brand: 'test:brand',
model: 'test:model',
series: 'test:series',
url: 'https://www.mediamarkt.de/de/product/-2641856.html',
},
Copy link
Owner

Choose a reason for hiding this comment

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

I would change this to use mediamarkt.at as well if you don't mind.

{
brand: 'gainward',
model: 'phoenix',
series: '3060ti',
url:
'https://www.mediamarkt.at/de/product/_gainward-grafikkarte-geforce-rtx-3060-ti-phoenix-golden-sample-8gb-ga-3060rtx-ti-ph-gs-1815563.html',
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
'https://www.mediamarkt.at/de/product/_gainward-grafikkarte-geforce-rtx-3060-ti-phoenix-golden-sample-8gb-ga-3060rtx-ti-ph-gs-1815563.html',
'https://www.mediamarkt.at/de/product/-1815563.html',

Also seems we can normalize these urls by using this. Do you mind changing that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

},
{
brand: 'gainward',
model: 'phantom gaming',
series: '3080',
url:
'https://www.mediamarkt.at/de/product/_gainward-grafikkarte-geforce-rtx-3080-phantom-10gb-ga-3080rtx-ph-1817678.html',
},
{
brand: 'asus',
model: 'dual',
series: '3060ti',
url:
'https://www.mediamarkt.at/de/product/_asus-grafikkarte-tuf-gaming-geforce-rtx-3060-ti-oc-8gb-tuf-rtx3060ti-o8g-gaming-1812392.html',
},
{
brand: 'zotac',
model: 'trinity',
series: '3080',
url:
'https://www.mediamarkt.at/de/product/_zotac-grafikkarte-geforce-rtx-3080-trinity-oc-10gb-zt-a30800j-10p-1803318.html',
},
{
brand: 'asus',
model: 'tuf',
series: '3080',
url:
'https://www.mediamarkt.at/de/product/_asus-grafikkarte-tuf-gaming-geforce%C2%AE-rtx-3080-tuf-rtx3080-10g-gaming-10gb-gddr6x-90yv0fb0-m0nm00-1799192.html',
},
{
brand: 'msi',
model: 'ventus 2x',
series: '3070',
url:
'https://www.mediamarkt.at/de/product/_msi-grafikkarte-geforce-rtx%E2%84%A2-3070-ventus-2x-oc-8gb-v390-008r-1812232.html',
},
{
brand: 'msi',
model: 'gaming x trio',
series: '3070',
url:
'https://www.mediamarkt.at/de/product/_msi-grafikkarte-geforce-rtx%E2%84%A2-3070-gaming-x-trio-8gb-v390-006r-1812223.html',
},
],
name: 'mediamarkt-at',
};