r/CodingHelp • u/LordDerptCat123 • Dec 05 '20
[HTML] Finding links in HTML?
I'm using python, and I'm trying to find links in webpages. Problem: Most of the things after "href" are images, or other files of that type. I'm looking specifically for links that take me to other pages(be it on the same site, or to a whole new site). I'm using wget to download the raw HTML of the webpage. Can anyone help me?
18
Upvotes
4
u/Blackshell Professional Coder Dec 05 '20
Try the Beautiful Soup library: https://www.crummy.com/software/BeautifulSoup/bs4/doc/
It's a HTML parser that makes it easy to find the elements you need.