I've read various answers for what blobs are, and I'm not understanding it, because it looks to me like a blob url is doing an xhr to change a url in the DOM, as if it was trying to do the equivalent of an internal redirect on a webserver for a private file that would be served based on view/object level permissions. Sometimes youtube has Blob urls in the html too, example. A related question (don't worry about answering this one, unless required). Why does good_url work, but not bad_url? I figured it might be a timeout thing, so I got that xhr, and immediately tested it from python, but still no luck. QuestionĬan someone please help me understand how to do this, and explain what's happening, whether it's on another site or youtube? Sometimes that downloads a small chunk of the video with no sound (few seconds long), and other times it will download a bigger chunk but with no image. Then I'll copy the url for that xhr, change the file extension to the correct one, and run the program.The headers for them always have the very long url for the request, accept-ranges: bytes, and content-type: video/webm, or something similar for mp4, etc. I'll check the network tab in the dev tools, and it's all filled with a bunch of xhr requests.But when I want a youtube video (and I obviously can't use a regular youtube url because the document request is different from the video request). Obviously it can be improved, but let's keep it super simple. The following code works for easy things. But I want to understand the process of what's happening. I also want to be able to get other free videos from other sites that are not on youtube.Īnd I know there are free sites and paid programs that let you put in a url, and it'll download it for you. But the problem is that pytube doesn't work for many videos on youtube now. Hi! Most answers refer to using pytube when using Python.
0 Comments
Leave a Reply. |