-
Notifications
You must be signed in to change notification settings - Fork 339
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
How to add proxy parameter #18
Comments
As of 3c37c92, there are two ways to do this, in your session configuration or in an individual request. Both methods use the from requests import Session
from robobrowser import RoboBrowser
# You can add your proxies to your session configuration, which means they'll
# apply to all requests by default:
session = Session()
session.proxies = {'http': 'http://my.proxy.com/'}
browser = RoboBrowser(session=session)
# Or you can choose proxies when calling open, follow_link, or submit_form,
# which overrides any default settings:
browser.open('https://github.com/', proxies={'http': 'http://another.proxy.com/'}) I'm closing this issue for now, but feel free to reopen if you encounter any issues with proxies. |
hi @jmcarp , thank you for your awesome work. I'm totally new in python. I realized that your code above would work perfectly, but as newbie I can't figured it out. I'm using script below & I would like to run the script via proxy server (e.g. 127.0.0.1:8080).
I've tried code bellow, but got no expected result.
feel free to edit script, any help from you would be much appreciated. |
I wonder how can I add a proxy when do http request.
Thanks.
The text was updated successfully, but these errors were encountered: