I have a Python script a.py
that prompts for a URL:
url = input('URL: ')
It uses modules to check headers for URL validity, takes the valid URL and downloads the first image from the webpage (URL) using Beautiful Soup. It works perfectly as a standalone Python script that I can run in my terminal/command prompt.
What I'd like to build is a webpage that utilizes my Python script and allows users to enter a URL form a web interface. Example:
<input type="text" name="url" />
<button>Download</button>
The URL entered from the input would then be passed into the python script when the user clicks on the Download button.