i am wondering how it is possible to download a video from a website.
import urllib
testfile = urllib.URLopener()
testfile.retrieve("http://randomsite.com/file.gz", "file.gz")
I understand that the above script is able to download a file as long as you have the file extension.
What i am wondering is how do i download a file without knowing it's extension?
How do i make a program that will download a video via inserting the videos url "Such as when you right click and copy video url"
If someone could point me in the right direction that would be appreciated !
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…