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: add alternate-fr, 3070ti, change alternate to alternate.de #2653

Merged
merged 3 commits into from
Jul 16, 2021
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 src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ const store = {
3060: envOrNumber(process.env.MAX_PRICE_SERIES_3060),
'3060ti': envOrNumber(process.env.MAX_PRICE_SERIES_3060TI),
3070: envOrNumber(process.env.MAX_PRICE_SERIES_3070),
'3070ti': envOrNumber(process.env.MAX_PRICE_SERIES_3070TI),
3080: envOrNumber(process.env.MAX_PRICE_SERIES_3080),
'3080ti': envOrNumber(process.env.MAX_PRICE_SERIES_3080TI),
3090: envOrNumber(process.env.MAX_PRICE_SERIES_3090),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Store} from './store';

export const Alternate: Store = {
export const AlternateDe: Store = {
currency: '€',
labels: {
inStock: {
Expand Down Expand Up @@ -1006,5 +1006,5 @@ export const Alternate: Store = {
url: 'https://www.alternate.de/html/product/1651221',
},
],
name: 'alternate',
name: 'alternate-de',
};
208 changes: 208 additions & 0 deletions src/store/model/alternate-fr.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
import {Store} from './store';

export const AlternateFr: Store = {
currency: '€',
labels: {
inStock: {
container: '#add-to-cart-form > div:nth-child(2) > div > span > b',
text: ['En stock'],
},
maxPrice: {
container: '.price > span:nth-child(1)',
euroFormat: true,
},
outOfStock: [
{
container: '#product-top-right > div:nth-child(4) > div > div',
text: ['Momentanément indisponible'],
},
{
container: '#content > div:nth-child(1) > div > h1',
text: ["L'article·n'est·pas·disponible·pour·le·moment."],
},
],
},
links: [
{
brand: 'test:brand',
model: 'test:model',
series: 'test:series',
url: 'https://www.alternate.fr/html/product/1679012',
},
{
brand: 'gigabyte',
model: 'aorus elite',
series: '3060',
url: 'https://www.alternate.fr/html/product/1757856',
},
{
brand: 'gigabyte',
model: 'gaming oc',
series: '3060',
url: 'https://www.alternate.fr/html/product/1723538',
},
{
brand: 'gigabyte',
model: 'vision oc',
series: '3060',
url: 'https://www.alternate.fr/html/product/1763772',
},
{
brand: 'gigabyte',
model: 'vision oc',
series: '3060',
url: 'https://www.alternate.fr/html/product/1726410',
},
{
brand: 'zotac',
model: 'amp white',
series: '3060',
url: 'https://www.alternate.fr/html/product/1715300',
},
{
brand: 'gigabyte',
model: 'gaming oc',
series: '3070ti',
url: 'https://www.alternate.fr/html/product/1756202',
},
{
brand: 'gigabyte',
model: 'eagle oc',
series: '3070ti',
url: 'https://www.alternate.fr/html/product/1762622',
},
{
brand: 'gigabyte',
model: 'aorus master',
series: '3070',
url: 'https://www.alternate.fr/html/product/1688810',
},
{
brand: 'gigabyte',
model: 'aorus master',
series: '3070ti',
url: 'https://www.alternate.fr/html/product/1759465',
},
{
brand: 'gigabyte',
model: 'vision oc',
series: '3070',
url: 'https://www.alternate.fr/html/product/1688819',
},
{
brand: 'gigabyte',
model: 'vision oc',
series: '3070ti',
url: 'https://www.alternate.fr/html/product/1761662',
},
{
brand: 'zotac',
model: 'amp holo',
series: '3070',
url: 'https://www.alternate.fr/html/product/1702466',
},
{
brand: 'msi',
model: 'gaming z trio',
series: '3080',
url: 'https://www.alternate.fr/html/product/1758119',
},
{
brand: 'zotac',
model: 'trinity',
series: '3080ti',
url: 'https://www.alternate.fr/html/product/1752971',
},
{
brand: 'zotac',
model: 'amp holo',
series: '3080ti',
url: 'https://www.alternate.fr/html/product/1752975',
},
{
brand: 'gigabyte',
model: 'aorus xtreme waterforce',
series: '3090',
url: 'https://www.alternate.fr/html/product/1694043',
},
{
brand: 'gigabyte',
model: 'gaming oc',
series: '3090',
url: 'https://www.alternate.fr/html/product/1672749',
},
{
brand: 'gigabyte',
model: 'vision oc',
series: '3090',
url: 'https://www.alternate.fr/html/product/1691159',
},
{
brand: 'msi',
model: 'gaming x trio',
series: '3090',
url: 'https://www.alternate.fr/html/product/1672341',
},
{
brand: 'palit',
model: 'gamerock',
series: '3090',
url: 'https://www.alternate.fr/html/product/1688678',
},
{
brand: 'xfx',
model: 'qick',
series: 'rx6700xt',
url: 'https://www.alternate.fr/html/product/1746956',
},
{
brand: 'gigabyte',
model: 'gaming oc',
series: 'rx6700xt',
url: 'https://www.alternate.fr/html/product/1723391',
},
{
brand: 'gigabyte',
model: 'aorus',
series: 'rx6700xt',
url: 'https://www.alternate.fr/html/product/17411817',
},
{
brand: 'xfx',
model: 'merc',
series: 'rx6700xt',
url: 'https://www.alternate.fr/html/product/1730305',
},
{
brand: 'msi',
model: 'gaming x',
series: 'rx6700xt',
url: 'https://www.alternate.fr/html/product/1730741',
},
{
brand: 'gigabyte',
model: 'aorus master',
series: 'rx6800xt',
url: 'https://www.alternate.fr/html/product/1705712',
},
{
brand: 'xfx',
model: 'merc',
series: 'rx6900xt',
url: 'https://www.alternate.fr/html/product/1759745',
},
{
brand: 'xfx',
model: 'merc',
series: 'rx6900xt',
url: 'https://www.alternate.fr/html/product/1713052',
},
{
brand: 'msi',
model: 'gaming trio',
series: 'rx6900xt',
url: 'https://www.alternate.fr/html/product/1751166',
},
],
name: 'alternate-fr',
};
6 changes: 4 additions & 2 deletions src/store/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {Materiel} from './materiel';
import {Adorama} from './adorama';
import {Akinformatica} from './akinformatica';
import {Allneeds} from './allneeds';
import {Alternate} from './alternate';
import {AlternateDe} from './alternate-de';
import {AlternateFr} from './alternate-fr';
import {AlternateNL} from './alternate-nl';
import {Amazon} from './amazon';
import {AmazonCa} from './amazon-ca';
Expand Down Expand Up @@ -163,7 +164,8 @@ export const storeList = new Map([
[Adorama.name, Adorama],
[Akinformatica.name, Akinformatica],
[Allneeds.name, Allneeds],
[Alternate.name, Alternate],
[AlternateDe.name, AlternateDe],
[AlternateFr.name, AlternateFr],
[AlternateNL.name, AlternateNL],
[Amazon.name, Amazon],
[AmazonCa.name, AmazonCa],
Expand Down
2 changes: 2 additions & 0 deletions src/store/model/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export type Series =
| '3060'
| '3060ti'
| '3070'
| '3070ti'
| '3080'
| '3080ti'
| '3090'
Expand Down Expand Up @@ -109,6 +110,7 @@ export type Model =
| 'gaming pro oc'
| 'gaming pro'
| 'gaming trio'
| 'gaming z trio'
| 'gaming x trio'
| 'gaming x'
| 'gaming x3'
Expand Down