fix(scraper): harden Bloomberg login state (#40)

This commit is contained in:
2026-11-24 19:49:06 +01:00
parent a55dc2e189
commit a3c70670f6
6 changed files with 248 additions and 69 deletions

View File

@ -27,8 +27,8 @@ async function runFixture ({ byparr = true, httpError = false, launchError = fal
const localRequire = createRequire(index)
const page = {
async setViewport () {}, async evaluateOnNewDocument () {},
async goto (url) { navigations.push(url) },
async evaluate () { return true }, async waitForSelector () {}, async type () {},
async goto (url) { navigations.push(url); return {status () {return 200}} },
async evaluate (fn) { return fn.name === 'inspectLoginState' ? {authenticated:true, loginForm:false} : true }, async waitForSelector () {}, async type () {},
async waitForFunction () {}, async waitForNavigation () {}, async $ () { return null },
keyboard: { async press () {} },
url () { return 'https://www.bloomberg.com/markets' },