breezy-iron-57241
08/07/2023, 7:18 PMimport requests
from bs4 import BeautifulSoup
URL = "https://enviro.com/products/catalogue/product/?prod=S50"
response = requests.get(URL)
if response.status_code == 200:
soup = BeautifulSoup(response.content, 'html.parser')
print(soup)
else:
print(f"Failed to retrieve the webpage. Status code: {response.status_code}")
The above function works and can scrape the URL