"Inspecting the HTML"

Webbskrapning i Python

Thomas Laetsch, PhD

Data Scientist, NYU

"Source" = HTML-kod

ViewSource.png

Source.png

Webbskrapning i Python

Inspektera element

InspectElement.png

ElementSource.png

Webbskrapning i Python

HTML-text till Selector

from scrapy import Selector
import requests

url = 'https://en.wikipedia.org/wiki/Web_scraping'
html = requests.get( url ).content
sel = Selector( text = html )
Webbskrapning i Python

Nu kan du våra hemligheter

Webbskrapning i Python

Preparing Video For Download...