Advertisement
dereksir

Untitled

Oct 2nd, 2023 (edited)
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. import urllib3
  2. import os
  3.  
  4. url = "https://www.g2.com/"
  5. apikey = os.environ.get("API_KEY")
  6. params = {
  7.     "url": url,
  8.     "apikey": apikey,
  9.     "js_render": "true",
  10.     "antibot": "true",
  11.     "premium_proxy": "true",
  12. }
  13.  
  14. # Create a urllib3 PoolManager
  15. http = urllib3.PoolManager()
  16.  
  17. # Encode the parameters and make a GET request through the ZenRows API
  18. request_url = "https://api.zenrows.com/v1/"
  19. response = http.request_encode_url("GET", request_url, fields=params)
  20.  
  21.  
  22. # Print the response content
  23. print(response.data)
  24.  
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement