[New-bugs-announce] [issue2868] Problem with urllib and urllib2 in urlopen?

Ambarish Malpani report at bugs.python.org
Thu May 15 19:35:18 CEST 2008


New submission from Ambarish Malpani <ambarish at yahoo.com>:

I have the following code:

import urllib
u = 'http://www.mercurynews.com/ci_9216417'
h = urllib.urlopen(u).read()
print h
# Get an empty string
#(can use urllib2 also - get the same behavior)

If I visit the same page with my browser, get the contents of the page
(after some redirects...)

----------
components: Extension Modules
messages: 66872
nosy: ambarish
severity: normal
status: open
title: Problem with urllib and urllib2 in urlopen?
type: behavior
versions: Python 2.5

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2868>
__________________________________


More information about the New-bugs-announce mailing list