· last year · Apr 23, 2024, 09:30 AM
1import httpx
2
3# define URL and API key
4url = 'https://www.amazon.com/Lumineux-Teeth-Whitening-Strips-Treatments-Enamel-Safe/dp/B082TPDTM2/?th=1'
5apikey = '<YOUR_ZENROWS_API_KEY>'
6
7# parameters for the ZenRows API request
8params = {
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
16with httpx.Client(params=params, timeout=40) as client:
17 response = client.get("https://api.zenrows.com/v1/")
18 print(response.text)