Update CAM4Recorder.py

This commit is contained in:
beaston02 2017-05-29 21:26:18 -07:00 committed by GitHub
parent 0750e8faa8
commit efdd29a212

View file

@ -30,6 +30,7 @@ i = 1
def startRecording(model):
try:
req = urllib.request.Request('https://www.cam4.com/' + model)
req.add_header('UserAgent', UserAgent)
resp = urllib.request.urlopen(req)
@ -61,6 +62,8 @@ def startRecording(model):
data = fd.read(1024)
f.write(data)
except:
pass
if model in recording:
recording.remove(model)