Answers for "scrape with beautiful soup"

0

scrape with beautiful soup

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=',''))
Posted by: Guest on May-08-2022

Python Answers by Framework

Browse Popular Code Answers by Language