Hi I cannot figure out how to find links which begin with certain text for the life of me.
findall(‘a’) works fine, but it’s way too much. I just want to make a list of all links that begin with
http://www.nhl.com/ice/boxscore.htm?id=
Can anyone help me?
Thank you very much
First set up a test document and open up the parser with BeautifulSoup:
Next, we can search for all
<a>tags with anhrefattribute starting withhttp://www.nhl.com/ice/boxscore.htm?id=. You can use a regular expression for it: