I have a video in a url, that I want download it using Python. The problem here is that when I execute the script and download it, the final file just have 1 kb, it's like never start the process of download.
I tried with this solution that I saw in https://stackoverflow.com/a/16696317/5280246:
url_video = "https://abiu-tree.fruithosted.net/dash/m/cdtsqmlbpkbmmddq~1504839971~190.52.0.0~w7tv1per/init-a1.mp4"
rsp = requests.get(url_video, stream=True)
print("Downloading video...")
with open("video_test_10.mp4",'wb') as outfile:
for chunk in rsp.iter_content(chunk_size=1024):
if chunk:
outfile.write(chunk)
rsp.close()
Too I tried like this:
url_video = "https://abiu-tree.fruithosted.net/dash/m/cdtsqmlbpkbmmddq~1504839971~190.52.0.0~w7tv1per/init-a1.mp4"
rsp = requests.get(url_video)
with open("out.mp4",'wb') as f:
f.write(rsp.content)
I tried too with:
urllib.request.retrieve(url_video, "out.mp4")