For an existing RoboBrowser application, pass in the Requests Session that owns the proxy defaults:

from requests import Session
from robobrowser import RoboBrowser

session = Session()
session.proxies.update({
    'http': 'http://proxy.example.net:8080',
    'https': 'http://proxy.example.net:8080',
})

browser = RoboBrowser(session=session, parser='html.parser')
browser.open('https://example.net/form')

The HTTP proxy list can supply addresses for these defaults when making permitted public-page requests without proxy authentication. RoboBrowser uses this session for its requests. The same object also holds cookies and other Requests state as the application navigates or submits forms. Creating another browser without passing the session creates another default Session.

For a particular operation, RoboBrowser's public open, follow_link and submit_form interfaces accept request arguments, including proxy options. That provides an operation-level choice when the defaults are not the desired route for every action.

Requests still has its normal environment-merging behavior. Treat the session's proxies as client defaults and inspect conflicting environment settings if an operation selects another endpoint.

ХӀокхунах тера йаззамаш