mirror of
https://github.com/thelittlerocket/CAM4Recorder.git
synced 2025-01-31 01:58:18 +08:00
Update CAM4Recorder.py
This commit is contained in:
parent
0750e8faa8
commit
efdd29a212
1 changed files with 34 additions and 31 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue