Go to advanced search

by edmundLi
Sat May 10, 2014 5:21 pm
Forum: Python
Topic: python urllib2 error no address associated to host name
Replies: 9
Views: 9060

Re: python urllib2 error no address associated to host name

Hey man, I experienced a similar problem. Found out it had to do with sockets. This is the code I used: ====== import socket import urllib ipAdd = socket.gethostbyname('www.google.com') ## looks up google's ip address (i think) ipAddFormatted = 'http://'+ipAdd ## formats the ip address for urlopen f...

Go to advanced search