import cv2 import urllib2 url = "http://72.45.175.148/-wvhttp-01-/GetOneShot?image_size=640x480&frame_count=1000000000" src = urllib2.urlopen(url) if not x.info().type.startswith("image"): cap = cv2.VideoCapture("http://72.45.175.148/-wvhttp-01-/GetOneShot?image_size=640x480&frame_count=1000000000") ret, frame = cap.read() cv2.imwrite(frame, "/usr/tmp/tst.jpg") 'multipart/x-mixed-replace' 'image/jpeg'