How to get HTTP error when using urlretrieve()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • silverburgh.meryl@gmail.com

    #1

    How to get HTTP error when using urlretrieve()

    Hi,

    I use urlretrieve to retrieve resources from a http server.
    Can you please tell me how can I get the HTTP error (whenever
    happens)?

    And what kind of different exception urlretrieve will throw? e.g.
    unknown host? connection timeout? HTTP error?

    Thank you.

  • Alex Martelli

    #2
    Re: How to get HTTP error when using urlretrieve()

    silverburgh.mer yl@gmail.com <silverburgh.me ryl@gmail.comwr ote:
    Hi,
    >
    I use urlretrieve to retrieve resources from a http server.
    Can you please tell me how can I get the HTTP error (whenever
    happens)?
    >
    And what kind of different exception urlretrieve will throw? e.g.
    unknown host? connection timeout? HTTP error?
    I think <http://www.python.org/doc//lib/module-urllib.htmlgive s good
    information about these issues.


    Alex


    Comment

    Working...