Hi I copied a code from the web, but it seems not to work.
It checks if a streamer is online
import urllib.request
import urllib.parse
import json
def main():
streamer = [
"nl_Kripp",
"AdmiralBulldog"
]
CLIENT_ID = "ClientIDfromtwitch"
URL = "https://api.twitch.tv/kraken/streams/"
resps = []
online_streams = []
for id in streamer:
header = {"client-id": CLIENT_ID}
req = urllib.request.Request(URL + id, headers=header)
recv = urllib.request.urlopen(req)
resps.append(json.loads(recv.read().decode("UTF-8")))
for r in resps:
print(r)
if __name__ == '__main__':
main()
I get the following error message: urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)>