pafy python code example
Example 1: how to use pafy
import pafy
url = 'your url here'
video = pafy.new(url)
audio = video.getbestaudio()
audio.download()
Example 2: pafy doc
import pafy
v = pafy.new("dQw4w9WgXcQ")
print(v.title)
print(v.duration)
print(v.rating)
print(v.author)
print(v.length)
print(v.keywords)
print(v.thumb)
print(v.videoid)
print(v.viewcount)