Hey I created a script to datascrape a specific website, the code is ok but i get a error when i try to excecute the code.
Tried cmd to excecute the file so i can get results but still a error.
NameError: name 'scrape' is not defined
''scrape.py'' File "", line 1
import requests
from bs4 import BeautifulSoup
url = "sawadee.nl/groepsrondreizen/midden-en-zuid-amerika/costa-rica"
response = requests.get(url)
soup = BeautifulSoup(response.text, "html.parser")
for row in soup.select(".departure-list__table tbody tr"):
date = row.select_one(".departure-list__date").text.strip()
group = row.select_one(".departure-list__group").text.strip()
print(f"Op {date} is de groepssamenstelling: {group}")

How did you run the script?
If you run it from the terminal you have to run something like this: