There are a couple of ways to achieve this. You could use Apache modules like mod_python or mod_wsgi (which adheres to wsgi python standard), you could use a cgi script or you can use PHP (which is fairly common in web environments) to execute the python script through exec or system function.
I think the easiest one would be just use PHP.
exec('python /path/to/file.py');
Edit: I just realized that my solution only describes how to run the python script.
You could pass the url input through an argument on python.
$url = $_GET['url'];
exec("python /path/to/file.py $url");
This is potentially dangerous even with user input validation.
To execute it through a button, you could do an AJAX call. (jQuery example)
$('#button').on('click', function() {
$.get('python.php', {url : 'url' });
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…