"Inspecting the HTML"

Web Scraping in Python

Thomas Laetsch, PhD

Data Scientist, NYU

"Source" = HTML Code

ViewSource.png

Source.png

Web Scraping in Python

Inspecting Elements

InspectElement.png

ElementSource.png

Web Scraping in Python

HTML text to 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 in Python

You Know Our Secrets

Web Scraping in Python

Preparing Video For Download...