Python urllib2 resume download doesn't work when network reconnects

后端 未结 1 744
日久生厌
日久生厌 2021-01-07 07:51

I\'m using urllib2 to make a resuming downloader, roughly based on this method. I can end the program and re-start it, and it starts downloading where it left off, downloadi

相关标签:
1条回答
  • 2021-01-07 08:37

    I added self._outfile.close() with the self._netfile.close() in the IOError handler, that seems to have fixed it. I guess this error was caused by opening for appending again without closing it.

    0 讨论(0)
提交回复
热议问题