Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import json
- import time
- import webbrowser
- import ctypes
- APIkey = 'APIKEYHERE'
- y = ''
- x = ''
- userId = ''
- def userWatch(APIkey,userId):
- userInfo = json.loads(requests.get('https://api.torn.com/user/%s?selections=basic&key=%s'%(userId,APIkey)).text)
- for value in userInfo['status']:
- y = value
- if y == 'Okay':
- clv = ctypes.windll.user32.MessageBoxW(0, (userInfo['name']+' is '+y), 'ALERT', 0x30 | 0x1000)
- if clv == 1:
- webbrowser.open_new('https://www.torn.com/profiles.php?XID=%s'%(userId))
- print()
- userr = input("Choose another target (y/n) ")
- if userr == 'y':
- userInputs()
- else:
- input('press "Enter" to quit')
- sys.exit
- def watch(y,x,userId):
- while y != 'Okay':
- time.sleep(int(x))
- userWatch(APIkey,userId)
- def userInputs():
- userId = input('Enter User ID - ')
- x = input('Refresh time - ')
- watch(y,x,userId)
- userInputs()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement