Add Intercom Articles detection, dismiss dialogs in NPM driver

main
Elbert Alias 4 years ago
parent f2b0ed4c64
commit a9ab70f016

@ -5636,6 +5636,14 @@
"script": "(?:api\\.intercom\\.io/api|static\\.intercomcdn\\.com/intercom\\.v1)", "script": "(?:api\\.intercom\\.io/api|static\\.intercomcdn\\.com/intercom\\.v1)",
"website": "https://www.intercom.com" "website": "https://www.intercom.com"
}, },
"Intercom Articles": {
"cats": [
4
],
"html": "<a href=\"https://www.intercom.com/intercom-link[^\"]+solution=customer-support[^>]+>We run on Intercom",
"icon": "Intercom.svg",
"website": "https://www.intercom.com/articles"
},
"Intershop": { "Intershop": {
"cats": [ "cats": [
6 6
@ -15032,7 +15040,7 @@
"priority": 2 "priority": 2
}, },
"4": { "4": {
"name": "Documentation tools", "name": "Documentation",
"priority": 2 "priority": 2
}, },
"5": { "5": {
@ -15284,4 +15292,4 @@
"priority": 9 "priority": 9
} }
} }
} }

@ -217,6 +217,8 @@ class Site {
await page.setRequestInterception(true) await page.setRequestInterception(true)
page.on('dialog', (dialog) => dialog.dismiss())
page.on('error', (error) => this.error(error)) page.on('error', (error) => this.error(error))
let responseReceived = false let responseReceived = false

@ -561,7 +561,7 @@ const Driver = {
const count = Object.keys(hostnames).length const count = Object.keys(hostnames).length
if (count && (count >= 50 || Driver.lastPing < Date.now() - expiry)) { if (count && (count >= 50 || Driver.lastPing < Date.now() - expiry)) {
await Driver.post('https://api.wappalyzer.com/ping/v1/', hostnames) await Driver.post('https://api.wappalyzer.com/ping/v2/', hostnames)
await setOption('hostnames', (Driver.cache.hostnames = {})) await setOption('hostnames', (Driver.cache.hostnames = {}))

Loading…
Cancel
Save