Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from bs4 import BeautifulSoup
- #getting the html code of the page from the url
- url = "https://www.youtube.com/watch?v=bHkQb3gnSRA"
- r = requests.get(url)
- #print(r.content)
- #making it usable by BeautifulSoup
- soup = BeautifulSoup(r.content, "lxml")
- #print(soup.prettify())
- likes = soup.find_all("a", {"class": "yt-simple-endpoint"})
- print(likes)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement