urllib2.urlopen hangs, urllib.urlopen works?

Discussion in 'Python' started by Chris, Jul 10, 2005.

  1. Chris

    Chris Guest

    hello,
    I have an odd behaviour. I try to download some files connected to a
    specific webpage (e.g. all stylesheets) with
    urllib2.urlopen(x)
    This seems to hang on the 2nd file or so.

    Doing the exact same thing via
    urllib.urlopen(x)
    does work without a hitch...

    I don't really to use urllib instead of urllib2 but am wondering where
    the problem is and if there is a workaround (or just my own stupidity)?
    Also with urllib I cannot send my own user-agent header as i wanted to do...

    thanks for any hint!

    chris
     
    Chris, Jul 10, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xu, C.S.
    Replies:
    5
    Views:
    515
    John J. Lee
    Sep 17, 2003
  2. Chris Withers

    urllib.urlopen with threads

    Chris Withers, Oct 9, 2003, in forum: Python
    Replies:
    0
    Views:
    347
    Chris Withers
    Oct 9, 2003
  3. Chris Withers

    Re: urllib.urlopen with threads

    Chris Withers, Oct 9, 2003, in forum: Python
    Replies:
    0
    Views:
    414
    Chris Withers
    Oct 9, 2003
  4. Replies:
    3
    Views:
    2,117
    Cousin Stanley
    Dec 31, 2003
  5. Christodoulos Fragoudakis

    urllib.urlopen() freezes unexpectedly

    Christodoulos Fragoudakis, Jun 7, 2004, in forum: Python
    Replies:
    1
    Views:
    888
    Christos TZOTZIOY Georgiou
    Jun 7, 2004
Loading...

Share This Page