Advertisement
dereksir

Untitled

Apr 23rd, 2024 (edited)
558
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. import httpx
  2.  
  3. # define URL and API key
  4. url = 'https://www.amazon.com/Lumineux-Teeth-Whitening-Strips-Treatments-Enamel-Safe/dp/B082TPDTM2/?th=1'
  5. apikey = '<YOUR_ZENROWS_API_KEY>'
  6.  
  7. # parameters for the ZenRows API request
  8. params = {
  9.     'apikey': apikey,
  10.     'url': url,
  11.     'js_render': 'true',
  12.     'premium_proxy': 'true',
  13. }
  14.  
  15. # make a GET request using httpx with the specified parameters
  16. with httpx.Client(params=params, timeout=40) as client:
  17.     response = client.get("https://api.zenrows.com/v1/")
  18.     print(response.text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement