Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class discord_rito():
- #d = grab_weather()
- ritoLink = 'https://na1.api.riotgames.com/lol/summoner/v3/summoners/by-name/incompatible?api_key=RGAPI'
- def __init__(self):
- self.dummyID = '59641562'
- self.dummyName = 'Incompatible'
- self.string = None
- self.j = None
- self.summName = None
- def requestUrl(self, url):
- response = urlopen(url)
- self.string = reponse.read().decode('utf-8')
- self.j = json.loads(self.string)
- print(self.j)
- self.requestUrl(ritoLink)
- PS C:\Workspace\Discord_Ry> py .\rito.py
- Traceback (most recent call last):
- File ".\rito.py", line 4, in <module>
- class discord_rito():
- File ".\rito.py", line 20, in discord_rito
- self.requestUrl(ritoLink)
- NameError: name 'self' is not defined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement