By @dnl0x00
Parsing HTML data is a common task which is also very error prone if you try to write your own parser or if you try to parse HTML it via regular expressions. Parsing HTML data in Python with the Python package “Beautiful Soup” is quite easy and can be done with just a few lines of code.
Look at the example below. It shows you how easy it is with Beautiful Soup to extract all links which match a certain regular expression.