Wilhelm
Wilhelm

Reputation: 11

Python requests: requests.get returns 404 on valid url

I am trying to get apps which are similar to an app from the Google Play Store in python, using the requests API.

This returns a happy 200:

payload = {"id":"apk_name"}
requests.get("https://play.google.com/store/apps/details", params = payload) 

This returns a 404:

requests.get("http://play.google.com/store/apps/similar", params = payload)

The last request produces a valid url for both Chrome and postman, how could I create a valid request for similar apps?

To make matters more interesting, was testing this in my terminal, it worked twice in a row, then went back to replying with a 404.

Upvotes: 0

Views: 2605

Answers (1)

Wilhelm
Wilhelm

Reputation: 11

Solved it by using the answer here https://stackoverflow.com/a/13854790/4658520

Issue was using session, not HttpAuth

Upvotes: 1

Related Questions