data = requests.get("www.ibm.com").text soup = BeautifulSoup.(data, "html.parser") for link in soup.find_all('a',href=True): # in html anchor/link is represented by the tag <a> print(link.get('href'))