Some iTunes URL generate 404 response from python but still work when you browse them from a web browser I am using python requests to get itunes URL responses. 

for some links it works and for others it doesn't, for example:

working - https://itunes.apple.com/SA/app/id944846798?ls=1&amp;mt=8

not working - https://itunes.apple.com/app/id1029783189?mt=8 
(getting a 404 error)

I noticed that the difference between the 2 links is that if i paste the working one in the browser, it opens it correctly, and if i paste the non-working one, it tries to open itunes and get stuck.

I tried few user-agents, for example:


  "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101
  Firefox/57.0"
  
  "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36
  (KHTML, like Gecko) Chrome/62.0.3188.0 Safari/537.36"


Since spoofing a user agent isn't enough for my python tool to appear like a web browser, Is there something else I can try?
I found a way to bypass it. 
It seems that itunes is sending back a 404 response for some applications, especially (from what i've seen) if they have restricted content such as gambling.

the way get around it is instead of sending a request to the main apple store like here 


  https://itunes.apple.com/app/id1029783189?mt=8


one should send the request to the local appstore.
In this example case, the Australian one:


  https://itunes.apple.com/au/app/id1029783189


Thanks for everyone who tried to help.