Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


Web Scraping with BeautifulSoup and Requests py filter_list
Author
Message
Web Scraping with BeautifulSoup and Requests py #1
import requests
from bs4 import BeautifulSoup

url = 'https://example.com'
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')

# Extract all the links on the webpage
links = [a['href'] for a in soup.find_all('a', href=True)]
print("Links on the webpage:", links)

Reply







Users browsing this thread: 1 Guest(s)