To develop a web scraping tool, we can use libraries such as beautifulsoup and scrapy. Here, I'm giving some of the basic code for web scraping.
Take a look at the code snippet in Figure 2.6, which is used to develop a basic web scraper using beautifulsoup:
![](https://static.packt-cdn.com/products/9781787121423/graphics/assets/b319fd5a-5d4e-4fc7-a6e0-0f461633119e.png)
Figure 2.6: Basic web scraper tool using beautifulsoup
The following Figure 2.7 demonstrates the output:
![](https://static.packt-cdn.com/products/9781787121423/graphics/assets/f53b1140-5385-448d-a2f1-3e45601e6d69.png)
Figure 2.7: Output of basic web scraper using beautifulsoup
You can find the installation guide for beautifulsoup and scrapy at this link:
https://github.com/jalajthanaki/NLPython/blob/master/ch2/Chapter_2_Installation_Commands.txt.
You can find the code at this link:
https://github.com/jalajthanaki/NLPython/blob/master/ch2/2_2_Basic_webscraping_byusing_beautifulsuop.py.
If you get any warning while running the script, it will be fine; don't worry about warnings.
Now, let's do some web scraping...