"การตรวจสอบ HTML"

Web Scraping ด้วย Python

Thomas Laetsch, PhD

Data Scientist, NYU

"Source" = โค้ด HTML

ViewSource.png

Source.png

Web Scraping ด้วย Python

การตรวจสอบ Element

InspectElement.png

ElementSource.png

Web Scraping ด้วย Python

แปลงข้อความ HTML เป็น Selector

from scrapy import Selector
import requests

url = 'https://en.wikipedia.org/wiki/Web_scraping'
html = requests.get( url ).content
sel = Selector( text = html )
Web Scraping ด้วย Python

รู้จักความลับของเราแล้ว

Web Scraping ด้วย Python

Preparing Video For Download...