Show all links from a website with Python and BeautifulSoup – Video

Showing all links from a website with Python and BeautifulSoup is actually 6 lines of code – 2 to define the used libraries and 4 to do the job:

In general, BeautifulSoup comes out of the box with beautiful documentation, which can teach a lot of stuff. And the results look ok:

These 6 lines inspired me so much, that I even did a 15 minute video available here:

The code from  the video is a bit different, as it uploads to a file as well:

Enjoy it!

Tagged with: , , , , ,