How do I create a website data scraper in Python? I want you to write an example Python 3 file that, when run, extracts the textual content from any website.
Below is an example of a Python 3 file that can be used as a website data scraper. This example uses the requests and BeautifulSoup libraries to extract the textual content from any website.

# Import the libraries
import requests
from bs4 import BeautifulSoup

# Specify the URL of the website
url = 'http://example.com'

# Create a GET request to the URL
response = requests.get(url)

# Parse the response into HTML
soup = BeautifulSoup(response.text, 'html.parser')

# Extract the textual content from the response
text = soup.get_text()

# Print the text
print(text)
Modify the example to be in the form of a web application which takes user input to specify the URL to scrape and then prints the scraped text to the user after they click the Submit button.