-
Notifications
You must be signed in to change notification settings - Fork 740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: better newUrlFunction
for ProxyConfiguration
#2392
Conversation
Also cc #2310 - this solves the issue from there - but only for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me otherwise 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few nits/ideas
Looking at |
@barjin documentation for this ? How do we configure it? |
@harshmaur - keep in mind that this feature is not yet in the stable version of Crawlee (will be included in the next release). Right now, you can try it out by installing the These are mostly internal changes to how we manage proxies in browser-based crawlers, but the external API changed a bit too. See the JSDoc for ...
newUrlFunction: (sessionId, { request } = {}) {
if (request?.url.includes('example.com')) return null;
return 'default.proxy.com';
}
... Let us know if you encounter any issues with this. Cheers! |
Okay this is great! that's exactly what I needed.
… Message ID: ***@***.***>
|
Based on changes from #2348 , this PR simplifies the proxy handling in the browser crawlers and makes those more intuitive.
Ready for reviews!
Closes #2065