In this recipe, we will integrate code that we wrote for scraping and getting a clean job listing from StackOverflow with our API. This will result in a reusable API that can be used to perform on-demand scrapes without the client needing any knowledge of the scraping process. Essentially, we will have created a scraper as a service, a concept we will spend much time with in the remaining recipes of the book.
Integrating the REST API with scraping code
Getting ready
The first part of this process is to create a module out of our preexisting code that was written in Chapter 7, Text Wrangling and Analysis so that we can reuse it. We will reuse this code in several recipes throughout the remainder of the book. Let's...