Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: Mario Lopes
Added: Nov 18, 2018 5:13 PM
Views: 25
Tags: pythonlinks
  1. from bs4 import BeautifulSoup
  2. import requests
  3. url = 'http://cheirabem.com'
  4. url_get = requests.get(url)
  5. soup = BeautifulSoup(url_get.content, 'lxml')
  6. for a in soup.find_all('a', href=True):
  7.     print ("Encontrei:", a['href'])