feat(lookup): handle Cloudflare DDoS protection (#1434)

Resolves #1297
This commit is contained in:
neatchee
2020-12-17 08:49:43 -08:00
committed by GitHub
parent 2b5588bd46
commit f86a8259f3
2 changed files with 79 additions and 11 deletions
+12
View File
@@ -95,6 +95,18 @@ export const Print = {
return `${buildProductString(link, store)} :: CAPTCHA`;
},
cloudflare(link: Link, store: Store, color?: boolean): string {
if (color) {
return (
'✖ ' +
buildProductString(link, store, true) +
' :: ' +
chalk.yellow('CLOUDFLARE, WAITING')
);
}
return `${buildProductString(link, store)} :: CLOUDFLARE, WAITING`;
},
inStock(link: Link, store: Store, color?: boolean, sms?: boolean): string {
const productString = `${buildProductString(link, store)} :: IN STOCK`;