Getting ready

We will access a locally installed Elasticsearch server. To do this from Python, we will use the Elasticsearch-py library. It is most likely that you will need to install this using pip: pip install elasticsearch.

Unlike PostgreSQL and MySQL, we do not need to create tables in Elasticsearch ahead of time. Elasticsearch does not care about structured data schemas (although it does have indexes), so we don't have to go through this procedure.

Get Python Web Scraping Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.