search

Home  >  Q&A  >  body text

Python urllib2 timeout

大家讲道理大家讲道理2922 days ago472

reply all(2)I'll reply

  • PHPz

    PHPz2017-04-18 10:12:42

    Python’s official documentation states that if you do not specify a timeout, then it will use the timeout value of the socket. And the socket is actually provided by the operating system, so the timeout value depends on the operating system.

    It is possible that your task happens to be within the socket timeout of Windows but outside the socket timeout of Linux.

    reply
    0
  • PHPz

    PHPz2017-04-18 10:12:42

    You can print out the download link to see if there are spaces or abnormal characters in it. I have encountered this situation. Because urlopen does not support paths with spaces.

    reply
    0
  • Cancelreply