Ответсообщение недоступно
А можешь подсказать как кусок видео скачать? А не фулл видос? Я доку почитал, вроде всё правильно, но он качает кусок начиная со старта и до конца:
Audio length: 3602.133 sec, start_sec: 1786.0665
start_hms = str(timedelta(seconds=int(start)))
end_hms = str(timedelta(seconds=int(start + duration)))
try:
opts = {
"cookiefile": await self._get_cookies_file(profile.cookies),
"format": "bestaudio/best",
"download_sections": {"*": f"{start_hms}-{end_hms}"},
"outtmpl": outtmpl,
"quiet": True,
"no_warnings": True,
"proxy": profile.proxy,
}
with YoutubeDL(opts) as ydl:
info = ydl.extract_info(url, download=True)
return ydl.prepare_filename(info)