Web Scraping in Python
Thomas Laetsch
Data Scientist, NYU
@ represents "attribute"@class@id@href

xpath = '//p[@class="class-1"]'

xpath = '//*[@id="uid"]'

xpath = '//div[@id="uid"]/p[2]'
Xpath Contains Notation:
contains( @attri-name, "string-expr" )
xpath = '//*[contains(@class,"class-1")]'

xpath = '//*[@class="class-1"]'


xpath = '/html/body/div/p[2]'

xpath = '/html/body/div/p[2]/@class'
Web Scraping in Python