Advertisement
dereksir

Untitled

Aug 25th, 2023
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. # Parse the HTML content using Beautiful Soup
  2. soup = BeautifulSoup(html_content, 'html.parser')
  3.  
  4. # Extract product names and prices
  5. products = soup.select('div.p-4 h4 > a')
  6. prices = soup.select('div.p-4 h5')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement