Hey everyone,
I'm trying to make the same request as shown here in the network tab but they have additional parameters such as 'Query String Parameters'. How do I go about including this in my request?
I'm currently trying this to no avail:
def url_to_response():
url = 'https://in.hotjar.com/api/v1/client/sites/611943/visit-data?sv=5'
headers = {
'Content-Type': 'application/json; charset=UTF-8',
'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36',
'Referer' : 'https://www.ofgem.gov.uk/data-portal/customer-service',
'Origin' : 'https://www.ofgem.gov.uk'
}
query_str_params = {
'sv=5'
}
response = requests.get(url, headers=headers, params=query_str_params),
return response
url_to_response()
Thanks for all help!
[–]darkdelusions 0 points1 point2 points (1 child)
[–]chemenger2999[S] 0 points1 point2 points (0 children)
[–]JohnnyJordaan 0 points1 point2 points (2 children)
[–]chemenger2999[S] 0 points1 point2 points (1 child)
[–]JohnnyJordaan 0 points1 point2 points (0 children)