Answer the question
In order to leave comments, you need to log in
How to download a video from a direct link?
I'm trying to download videos from YouTube, for downloading I use the site https://220youtube.com
To download videos through this site, you can use the following link:
https://220youtube.com/video
identifier ? downloaded all videos
There is a code:
import requests #импортируем модуль
url_vidos = input("Enter the Youtube-url\n") # получаем ссылку на видео
f=open(r'file.mp4',"wb") #открываем файл для записи, в режиме wb
ufr = requests.get('https://220youtube.com/'+str(url_vidos[:7])+'?x=22') #делаем запрос
f.write(ufr.content) #записываем содержимое в файл
f.close()
Answer the question
In order to leave comments, you need to log in
Because YouTube is how video storage and transmission is organized. And you have to download fragments and then combine them into a whole video. You can get started with the theory, for example, with these articles: MPEG-DASH and HLS .
And it all depends on the video format. It can be in hls format, then the video itself is initially broken into small pieces. Then you need to download an index file in m8u format, where all video clips are listed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question