Skip to content

Instantly share code, notes, and snippets.

@sqd sqd/CCWebcam.py
Created Aug 8, 2018

Embed
What would you like to do?
capture colorado college webcam
#!/usr/bin/python2
import pafy
import cv2
url = '8XFlf22-46s'
vpafy = pafy.new(url)
play = vpafy.getbest()
cap = cv2.VideoCapture(play.url)
ret, frame = cap.read()
cv2.imwrite('test.jpg', frame)
cap.release()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.