Skip to content

Commit

Permalink
another test
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyek committed Jun 12, 2024
1 parent b77b00e commit ecf9850
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion projects/scrape-txs/src/lib/bac-gt/scrape.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dayjs from 'dayjs';
import customParseFormat from 'dayjs/plugin/customParseFormat.js';
import { type BrowserContext, type Page } from 'playwright';
import { type Page } from 'playwright';
import { isMatching } from 'ts-pattern';
import { db, type DB, type InsertObject } from '../db';
import { waitRandomMs } from '../utils';
Expand Down Expand Up @@ -49,6 +49,14 @@ export async function bacGtScrape({
'Sec-Fetch-User': '?1',
'Upgrade-Insecure-Requests': '1',
});
await page.route('https://www.baccredomatic.com/', async (route) => {
const headers = Object.assign({}, route.request().headers(), {
Accept:
'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
'Accept-Encoding': 'gzip, deflate, br, zstd',
});
await route.continue({ headers });
});
await page.goto('https://www.baccredomatic.com/');
await waitRandomMs();
await page
Expand Down

0 comments on commit ecf9850

Please sign in to comment.