Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Import the modules
- import json
- import requests
- import time
- # Read The SteamID File and write to variables
- text_file = open("id.txt", "r")
- lines = text_file.read().split('\n')
- text_file.close()
- counter = 0
- while (counter < len(lines)):
- # Get the feed
- r = requests.get("https://api.roleplay.co.uk/v1/player/" + lines[counter] + "/minimal")
- r.text
- #If 404 Error print Steam ID Not Found
- if r.status_code == 404:
- print("Invalid Steam ID")
- counter =counter +1
- elif r.status_code == 429:
- time.sleep(360)
- else:
- # Convert it to a Python dictionary
- data = json.loads(r.text)
- #Print The UID
- print(data['uid'])
- counter =counter +1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement