chore: move linksBuilder log, add outOfStock amd-de

This commit is contained in:
Jef LeCompte
2020-12-09 11:30:56 -05:00
parent b2738370b4
commit 9dc04b3638
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -126,10 +126,10 @@ async function lookup(browser: Browser, store: Store) {
}
if (store.linksBuilder) {
logger.info(`[${store.name}] Running linksBuilder...`);
const lastRunTime = linkBuilderLastRunTimes[store.name] ?? -1;
const ttl = store.linksBuilder.ttl ?? Number.MAX_SAFE_INTEGER;
if (lastRunTime === -1 || Date.now() - lastRunTime > ttl) {
logger.info(`[${store.name}] Running linksBuilder...`);
try {
await fetchLinks(store, browser);
linkBuilderLastRunTimes[store.name] = Date.now();
+4
View File
@@ -9,6 +9,10 @@ export const AmdDe: Store = {
maxPrice: {
container: '.product-page-description h4',
euroFormat: true
},
outOfStock: {
container: '.btn-radeon',
text: ['ausverkauft']
}
},
links: [