update-hib.py
changeset 14 f7112a0f9df7
parent 13 7567c5e4db45
child 15 053eabfead09
equal deleted inserted replaced
13:7567c5e4db45 14:f7112a0f9df7
   278                         with open(fn,"wb") as f:
   278                         with open(fn,"wb") as f:
   279                             f.write(u.read())
   279                             f.write(u.read())
   280                     logging.info("%s saved.", os.path.realpath(fn))
   280                     logging.info("%s saved.", os.path.realpath(fn))
   281             except:
   281             except:
   282                 logging.exception("Error with download %r", dl)
   282                 logging.exception("Error with download %r", dl)
       
   283                 input("Press enter to continue...")
   283         else:
   284         else:
   284             logging.info("No torrent, url is %s", dl.web)
   285             logging.info("No torrent, url is %s", dl.web)
   285             fn = os.path.basename(urllib.parse.urlsplit(dl.web).path)
   286             fn = os.path.basename(urllib.parse.urlsplit(dl.web).path)
   286             urlfile.write("wget --progress=bar -c -O %s \"%s\"\n" % (fn,dl.web))
   287             urlfile.write("wget --progress=bar -c -O %s \"%s\"\n" % (fn,dl.web))
   287 
   288