I'm using XAMPP on Windows to work on a new version of my website. I have modified the Windows hosts file and the XAMPP Apache httpd-vhosts.conf file so that my browsers access the version of the website that is in my XAMPP htdocs directory.This works fine with my browsers but I want to use Python to access the site as well with code like with the following
from urllib.request import urlopenwebpage = "http://www.thedomain.org/index.html"page = urlopen(webpage)
Running this code I get the following error:
URLError: <urlopen error [WinError 10061] No connection could be madebecause the target machine actively refused it>
Any ideas on what configuration change(s) I need to make so that Python can access the local copy of my website just like it accesses websites normally? Thanks.