On Apr 26, 12:39 pm, "Dave Dean" <[EMAIL PROTECTED]> wrote: > Hi all, > I'm running into some trouble using urllib.urlopen to grab a page from our > corporate intranet. The name of the internal site is simplyhttp://web(no > www or com). I can use urlopen to grab a site likehttp://www.google.com > just fine. However, when I use urlopen to grab the internal site, I instead > get data fromhttp://www.web.com. This is the url returned by the geturl() > function. > There must be a way to stop Python, or whoever is doing it, from changing > my url. Maybe urllib is not the correct approach. Does anyone know a > solution to this? > Thanks, > Dave
Dunno for sure, but maybe you should be using urllib2. Good info on the module can be found here: http://www.voidspace.org.uk/python/articles/urllib2.shtml#fetching-urls I suppose you could also edit your hosts file too. Mike -- http://mail.python.org/mailman/listinfo/python-list