Summary
In this chapter, we went through several important concepts and learning modules related to advanced data gathering and web scraping. We started by reading data from web pages using two of the most popular Python libraries – requests and BeautifulSoup. In this task, we utilized the previous chapter's knowledge about the general structure of HTML pages and their interaction with Python code. We extracted meaningful data from the Wikipedia home page during this process.
Then, we learned how to read data from XML and JSON files, two of the most widely used data streaming/exchange formats on the web. For the XML part, we showed you how to traverse the tree-structure data string efficiently to extract key information. For the JSON part, we mixed it with reading data from the web using an API (Application Program Interface). The API we consumed was RESTful, which is one of the major standards in Web API.
At the end of this chapter, we went through a detailed exercise of using regex techniques...