How to download a clip of an YouTube video with pytube?
问题 I've been trying to download certain portions of YouTube video. The long way is to download the video then extract the certain portion of it. But when it comes to a big dataset with long videos, the method is costly. The code works. But downloads the entire video instead of the certain portion. from pytube import YouTube YouTube('https://www.youtube.com/embed/yf8Ub90OWFM?start=15&end=25').streams.first().download() Expected result: 10 second video in the time interval of 15-25 seconds. 回答1: