def parsehttp(url):
r = urllib.request.urlopen(url).read()
soup = BeautifulSoup(r, 'lxml')
for link in soup.find_all('a'):
href = link.attrs.get("href")
print(href)
I would like to be able to extract all outgoing links from a website, however, the code that I have right now is returning both relative links and outgoing links and I only want the outgoing links. The difference is outgoing links has the https portion in them while relative ones do not. I also want to obtain the 'title' portion that comes with each link as well.