xxxxxxxxxx
#import requests module to send request to the website
import requests
#from bs4 module import BeautifulSoup class
from bs4 import BeautifulSoup
r = requests.get(url=<website_url_here>).content
#server will send response and content is stored in 'r' object
#Use BeautifulSoup class with 'html.prser' or 'lxml'
soup = BeautifulSoup(r, 'html.parser')
xxxxxxxxxx
from bs4 import BeautifulSoup
import requests
page = requests.get("https://www.google.dz/search?q=see")
soup = BeautifulSoup(page.content)
links = soup.findAll("a")
for link in links:
if link['href'].startswith('/url?q='):
print (link['href'].replace('/url?q=',''))