First time here? Check out the FAQ!
I think you might only need to change the 0 in cap=cv2.VideoCapture(0) The the ip of your "online camera" or to a stream