Get tags from any video in youtube

The source code



import requests
import re
from bs4 import BeautifulSoup

url = input('Enter the URL of the video: ')
r = requests.get(url)
soup = BeautifulSoup(r.content, "html.parser")
try:
    k = soup.findAll('meta', {'property':'og:video:tag'})
    for t in k:
        print(t['content'])
    
except:
    print("We can't find the keywords")

Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

Disqus Comments