Get Network Error (dns_unresolved_hostname) using Requests, Urllib and Pandas

917 Views Asked by At

Trying to call a URL and get an HTML table from an internal server on network.

When entering a URL into a browser, the page and table load.

When calling URL in Python using Requests, URLLIB, and Pandas, a Network Error (dns_unresolved_hostname) is returned.

I have updated the hosts file to include Localhost. I unchecked "Don't use proxy server for local addresses". I can ping the server and it replies. I have changed the server name to the IP address and tried removing the port in the URL. No idea here.

import requests 
r = requests.get('http://fc12rp01:8000/bin/ReportCall.py?rule=N2') 
print(r.content)

Returns:

<HTML><HEAD>...........<big>Network Error (dns_unresolved_hostname)

Proxy Settings:

Proxy Settings

Host file settings:

Host file settings

0

There are 0 best solutions below