import cv2
import pafy
# Tokyo Station
url = 'https://youtu.be/6YRUWrkV2R4'
video = pafy.new(url)
streams = video.streams
for i in streams:
print(i)
# get best resolution regardless of format
best = video.getbest()
# start the video
cap = cv2.VideoCapture(best.url)
while (True):
ret, frame = cap.read()
cv2.imshow('frame', frame)
if cv2.waitKey(20) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
Chichibu is also famous for the animation “Anohana: The Flower We Saw That Day“. It was on air in 2011, but still may anime fans are visiting Chichibu, the place of anime scenes.