mirror of
https://github.com/ershisan99/scrape-icp.git
synced 2025-12-16 20:59:30 +00:00
try another url
This commit is contained in:
25
src/index.ts
25
src/index.ts
@@ -107,8 +107,10 @@ const scrape = async () => {
|
|||||||
timeout: 200000,
|
timeout: 200000,
|
||||||
logger: {
|
logger: {
|
||||||
isEnabled: (name, severity) => name === 'browser',
|
isEnabled: (name, severity) => name === 'browser',
|
||||||
|
log: (name, severity, message, args) => {
|
||||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||||
log: (name, severity, message, args) => { console.log(`${name} ${message}`) }
|
console.log(`${name} ${message}`)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const browser = await chr.newContext({
|
const browser = await chr.newContext({
|
||||||
@@ -122,8 +124,25 @@ const scrape = async () => {
|
|||||||
isMobile: false,
|
isMobile: false,
|
||||||
hasTouch: false,
|
hasTouch: false,
|
||||||
acceptDownloads: true,
|
acceptDownloads: true,
|
||||||
javaScriptEnabled: true
|
javaScriptEnabled: true,
|
||||||
|
permissions: [
|
||||||
|
'geolocation',
|
||||||
|
'notifications',
|
||||||
|
'midi',
|
||||||
|
'midi-sysex',
|
||||||
|
'push',
|
||||||
|
'camera',
|
||||||
|
'microphone',
|
||||||
|
'background-sync',
|
||||||
|
'ambient-light-sensor',
|
||||||
|
'accelerometer',
|
||||||
|
'gyroscope',
|
||||||
|
'magnetometer',
|
||||||
|
'accessibility-events',
|
||||||
|
'clipboard-read',
|
||||||
|
'clipboard-write',
|
||||||
|
'payment-handler'
|
||||||
|
]
|
||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
const page = await browser.newPage()
|
const page = await browser.newPage()
|
||||||
|
|||||||
Reference in New Issue
Block a user