Skip to content

Commit

Permalink
try with real chromium
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyek committed Jun 12, 2024
1 parent ecf9850 commit ccc734f
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions projects/scrape-txs/src/lib/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@ export async function run(months: dayjs.Dayjs[]) {
const config = configSchema.parse(configJson);
z.enum(['bancoIndustrialGt', 'bacGt'] as const).parse(process.env.BANK_KEY);

const browser = isLambda()
? ((await chromium.launch({
args: lambdaChromium.args,
executablePath: await lambdaChromium.executablePath(),
headless: true,
})) as Browser)
: await chromium.launch({
headless: false,
});
// const browser = isLambda()
// ? ((await chromium.launch({
// args: lambdaChromium.args,
// executablePath: await lambdaChromium.executablePath(),
// headless: true,
// })) as Browser)
// : await chromium.launch({
// headless: false,
// });
const browser = await chromium.launch({
headless: false,
});
const context = await browser.newContext({
userAgent:
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36',
Expand Down

0 comments on commit ccc734f

Please sign in to comment.