Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib3
- import os
- url = "https://www.g2.com/"
- apikey = os.environ.get("API_KEY")
- params = {
- "url": url,
- "apikey": apikey,
- "js_render": "true",
- "antibot": "true",
- "premium_proxy": "true",
- }
- # Create a urllib3 PoolManager
- http = urllib3.PoolManager()
- # Encode the parameters and make a GET request through the ZenRows API
- request_url = "https://api.zenrows.com/v1/"
- response = http.request_encode_url("GET", request_url, fields=params)
- # Print the response content
- print(response.data)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement