-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
scan.ts
53 lines (52 loc) 路 1.34 KB
/
scan.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import {Store} from './store';
import {getProductLinksBuilder} from './helpers/card';
export const Scan: Store = {
disableAdBlocker: true,
labels: {
captcha: [{
container: '#challenge-form',
text: ['hcaptcha_submit']
}],
inStock: {
container: '.buyPanel .priceAvailability',
text: ['add to basket', 'in stock']
},
outOfStock: {
container: '.buyPanel .priceAvailability',
text: ['pre order']
}
},
links: [
{
brand: 'test:brand',
model: 'CARD',
series: 'test:series',
url: 'https://www.scan.co.uk/products/msi-geforce-rtx-2060-ventus-xs-oc-6gb-gddr6-vr-ready-graphics-card-1920-core-1710mhz-boost'
}
],
linksBuilder: {
builder: getProductLinksBuilder({
productsSelector: 'ul.productColumns li.product',
sitePrefix: 'https://www.scan.co.uk',
titleSelector: '.details .description',
urlSelector: 'a[href]'
}),
ttl: 300000,
urls: [
{
series: '3070',
url: 'https://www.scan.co.uk/shop/computer-hardware/gpu-nvidia/nvidia-geforce-rtx-3070-graphics-cards'
},
{
series: '3080',
url: 'https://www.scan.co.uk/shop/computer-hardware/gpu-nvidia/nvidia-geforce-rtx-3080-graphics-cards'
},
{
series: '3090',
url: 'https://www.scan.co.uk/shop/computer-hardware/gpu-nvidia/nvidia-geforce-rtx-3090-graphics-cards'
}
]
},
name: 'scan',
waitUntil: 'domcontentloaded'
};