0

I'm trying to call a web request from the link specified below (may have changed slightly depending when you read this) but I only want a specific part of it, it's all one line. From the part "version":"12.30"I want to keep the 12.30 What code would I need to use?

LINK: https://fortnite-public-service-stage.ol.epicgames.com/fortnite/api/version

1 Answer 1

1

You can tell the requests module that it should convert the json string to a dictionary and then access the version

url = "https://fortnite-public-service-stage.ol.epicgames.com/fortnite/api/version"
response = requests.get(url)
version = response.json()["version"]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.