requests-html icon indicating copy to clipboard operation
requests-html copied to clipboard

.mount getting error

Open xitex opened this issue 4 years ago • 0 comments

Hi, Kenneth! Trying to use adapter with .mount() method but getting error The same code for requests lib works: `from requests_ip_rotator import ApiGateway

Create gateway object and initialise in AWS

gateway = ApiGateway("https://site.com", access_key_id="", access_key_secret="") gateway.start()

Assign gateway to session

session = requests.Session() session.mount("https://site.com", gateway)

Send request (IP will be randomised)

response = session.get("https://site.com/index.html") print(response.status_code)

Delete gateways

gateway.shutdown()`

When use requests_html got session_2 = HTMLSession.mount("https://site.com", gateway) TypeError: mount() missing 1 required positional argument: 'adapter'

Can you help me?

xitex avatar Sep 28 '21 13:09 xitex