I was trying to fetch a product info from an online store. It doesn't require any kind of authentication. I can see product information from the browser. I've inspected in developer tools and found the request which fetches data from the URL. My python code is bellow
import requests
def coles():
URL = "https://shop.coles.com.au/search/resources/store/20520/productview/bySeoUrlKeyword/mutti-tomato-passata-2349503p"
PARAMS = {
"catalogId": 12064
}
res = requests.get(URL,PARAMS)
print(res.text)
#coles()
if __name__ == '__main__':
coles()
But I'm getting this instead of the product info
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="shortcut icon" href="about:blank">
</head>
<body>
<script src="/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/j.js"></script>
<script src="/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/f.js"></script>
<script src="/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/fingerprint/script/kpf.js?url=/149e9513-01fa-4fb0-aad4-566afd725d1b/2d206a39-8ed7-437e-a3be-862e0f06eea3/fingerprint&token=dcc221cb-d87a-e9e3-5316-7c7a20910bf8"></script>
</body>
</html>
But in the inspection, I got something like this. Maybe I need to add some header information or missing something.
Here is request info and paramerter
If I put this request URL in browser I get the data.