Youtube'un anasayfasındaki videoların başlık ve sürelerini çeken python kodları
daha fazlası için github hesabım : https://github.com/godlessturtle/my-python-examples/tree/master
Kod:
import urllib.request
from bs4 import BeautifulSoup
url = "http://www.youtube.com/"
getSource = urllib.request.urlopen(url)
soup = BeautifulSoup(getSource, 'html.parser')
content = soup.find_all('h3', attrs={'class': 'yt-lockup-title'})
for i in range(0, len(content)):
print(i, ")", content[i].text)
daha fazlası için github hesabım : https://github.com/godlessturtle/my-python-examples/tree/master

