Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with connect(socketUrl) as ws:
- try:
- while True:
- with open(f'{folder}/{title}.mp4', 'ab') as f:
- msg = ws.recv()
- received_bytes += len(msg)
- print(f'Received {received_bytes} bytes')
- f.write(msg)
- except Exception:
- print(f'Connection Dropped, Reconnecting')
Advertisement
Add Comment
Please, Sign In to add comment