July 2017
Beginner to intermediate
312 pages
7h 27m
English
Usually, Scrapy comes with all the tools required to create the scraper and, when parsing, the HTML to target the right elements using xpath expressions or simple tag class or ID selectors. But there exists a tool that is worth mentioning here because it is one of the simplest HTML/XML parsers, called BeautifulSoup.
To install it, do the following:
$TODO add$
We will use the following document in our examples:
html_doc = """<html><head><title>The Dormouse's story</title></head><body><p class="title"><b>The Dormouse's story</b></p><p class="story">Once upon a time there were three little sisters; and their names were<a href="http://example.com/elsie" class="sister" id="link1">Elsie</a>,<a href="http://example.com/lacie" class="sister" ...
Read now
Unlock full access