Login Register






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





Messages In This Thread
Web Scraping with BeautifulSoup and Requests py - by vluzzy - 01-02-2024, 02:52 AM