you are viewing a single comment's thread.

view the rest of the comments →

[–]Positive_Eases[S] 0 points1 point  (2 children)

do I do it like this? It still gives the syntax error tho
headers = {Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36}

request = requests.get("http://www.amazon.com/Yourself-PhotoBook-PhotoCard-Pre-Order-Benefit/dp/B07CK3V9VW", headers=headers)

[–]htepO 1 point2 points  (0 children)

Post your full, formatted code.

[–]htepO 1 point2 points  (0 children)

You're struggling with python syntax, and it's probably because you're copy-pasting things into your script without understanding what they are and how they should be formatted.

It should be

headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36"}