Download snipet - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +--- Thread: Download snipet (/showthread.php?tid=10190) |
- donno - 2005-02-25 firstly i want some code which can download a file from a webpage. at them moment i use something like Quote:tmpweb = urllib.urlopener() first i want/need a way of showing a progress bar while a file download second i want to be able to set the referering url? for extra info the referer is the site which link or sent you to another. i have noticed something with the urllib2. here is a example from the python site. i haven't yet tested this to see if it can get avi's or gif's yet. Quote:import urllib, urllib2the only thing is getting the result from the open and writing them file. in the urlopener the retive comand does this for you. then using webdata.read() i need to be able to write a file. any ideas?. if there is a function like retrive( req, filename) that would be good too. and help would be greatly appericateted. |