Learn Web Scraping in 30-minutes

with Python and Beautiful Soup

Web scraping is a very powerful tool to learn for any data professional. With web scraping, the entire internet becomes your database. In this tutorial, we show you how to parse a web page into a data file (csv) using a Python package called BeautifulSoup.

There are many services out there that augment their business data or even build out their entire business by using web scraping. For example there is a steam sales website that tracks and ranks steam sales, updated hourly. Companies can also scrape product reviews from places like Amazon to stay up-to-date with what customers are saying about their products.

30 Minute Video Tutorial

Follow us On:

Very nice tutorial. Is there a way to download all the data ( data about TV , laptops etc ), without having to go to each separate section ? I mean that similar to this tutorial I can download data for TV and Laptops. Is there a way to do it automatically ? Thank you.

Phuc H Duong

Hey Gowrgos! You have to study the HTML code and build it. Essentially each new webpage is a new script, built custom for that page. Since each page is different.

Hi. I followed the tutorial as it is but on the page that I used one of containers doesn’t have brand image. That’s why I got an attribute error (AttributeError: ‘NoneType’ object has no attribute ‘img’). How can I fix it?

I can’t tell how old this article is (there are no dates that I can see), but in Python 2.7, the second line will throw an error, because urllib has changed to urllib2 now. The correct line is now:
from urllib2 import urlopen as uReq # Web client

https://blog.datasciencedojo.com/wp-content/uploads/2017/04/Intro-R-Visualizations-PowerBI-495x400-1.png400495DaveLangerhttps://blog.datasciencedojo.com/wp-content/uploads/2017/11/Logo_Tagline-Copy-1024x292-300x86.pngDaveLanger2017-04-25 10:44:282018-01-04 22:25:38Introduction to R Visualizations with Power BI