Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from bs4 import BeautifulSoup
- # Send a GET request to the target page
- response = requests.get("https://scrapeme.live/shop/")
- # print(response.text)
- # Parse the HTML content
- soup = BeautifulSoup(response.text, "html.parser")
- # Find all h2s (elements containing the pokemon names)
- pokemon_names = soup.find_all("h2")
- # Extract the text from each element
- for name in pokemon_names:
- print(name.text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement