Skip to content

Commit

Permalink
without some headers
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyek committed Jun 12, 2024
1 parent e5ab3a3 commit ad73fe9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions projects/scrape-txs/src/lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ export const handler: ScheduledHandler = async (_event) => {
try {
await run(months);
} catch (error: any) {
const emailSubject = `Scrape bank txs failed`;
const emailBody = `Error:
${error.stack}
`;
console.error(error);
const emailSubject = `Scrape bank txs failed for ${process.env.BANK_KEY}`;
const emailBody = `Error:\n${error.message}`;
await mailer.sendMail({
to: process.env.MAILER_ME,
subject: emailSubject,
Expand Down
6 changes: 3 additions & 3 deletions projects/scrape-txs/src/lib/bac-gt/scrape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export async function bacGtScrape({
const deleteTxIds: string[] = [];

await page.setExtraHTTPHeaders({
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',
// 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',
'Accept-Language': 'en-US,en;q=0.9',
'Sec-Ch-Ua':
'"Google Chrome";v="125", "Chromium";v="125", "Not.A/Brand";v="24"',
Expand Down

0 comments on commit ad73fe9

Please sign in to comment.