Skip to content

Commit

Permalink
Merge pull request #38 from sukbearai/fix/proxy-url
Browse files Browse the repository at this point in the history
fix: proxy url global setting
  • Loading branch information
wtfsayo authored Jan 5, 2025
2 parents 454b144 + 59b738e commit ffcfed4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ProxyAgent } from 'undici';
import { ProxyAgent,setGlobalDispatcher } from 'undici';
import { Scraper } from './scraper';
import fs from 'fs';

Expand Down Expand Up @@ -96,6 +96,8 @@ export async function getScraper(
}

agent = new ProxyAgent(agentOptions);

setGlobalDispatcher(agent)
}

const scraper = new Scraper({
Expand Down

0 comments on commit ffcfed4

Please sign in to comment.