Python ile web sitesinin içeriğini al – NLTK
Python ile web sitesinin içeriğini alıp html taglerinden kurtulup kendimize içerik oluşturabiliriz. Daha sonra bu içeriği NLTK kütüphanesi ile kullanarak text mining yapacağız. Python 3.6.4 Shell ‘de aşağıdaki komutları çalıştırabilirsiniz. from bs4 import BeautifulSoup import urllib.request response = urllib.request.urlopen(‘http://www.erdiyurdakul.com’) html = response.read() soup = BeautifulSoup(html,”html.parse”) text = soup.get_text(strip=True) print (text) Eğer BeautifulSoup bulunamadı hatası […]