🧲İnternet Üzerinden Veri Çekme
Python ile internet, web üzerinden veri alma, çekme (data grab, web grab)
💨 URL'den Veri Alma
import urllib.request
contents = urllib.request.urlopen("http://example.com/foo/bar").read()
# Encoding işlemi için (https://stackoverflow.com/a/17615424/9770490)
encoding = "utf-8"
contents = contents.decode(encoding)🆔 Web Kimliği UserAgent Ayarlama
UserAgent Ayarlamafrom urllib.request import urlopen, Request
HTML = "" # Örn: https://en.wikipedia.org/
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.3'}
reg_url = HTML
req = Request(url=reg_url, headers=headers)
html = urlopen(req).read() # Pandas için kullanılacak html objesi🧐 Tarayıcı Üzerinden Veriyi Bulma


🐍 Python Kodu ile Veriyi Çekme
📅 Tablo Verisi Alma


👮♂️ Verilerin Sağlaması Gereken Özellikler
Last updated
Was this helpful?