Feb-10-2020, 05:11 PM
While scraping an webpage I found that the src of a video link is supplied as a blob object. Like this: src = blob:"www.xyz...."
Now how to deal with blob object in python?
Now how to deal with blob object in python?
Blob object
|
Feb-10-2020, 05:11 PM
While scraping an webpage I found that the src of a video link is supplied as a blob object. Like this: src = blob:"www.xyz...."
Now how to deal with blob object in python?
Feb-10-2020, 05:38 PM
The URL would be most helpful.
Also tag and parents
Feb-11-2020, 02:17 AM
(This post was last modified: Feb-11-2020, 02:17 AM by Man_from_India.)
(Feb-10-2020, 05:38 PM)Larz60+ Wrote: The URL would be most helpful. Quote:<video tabindex="-1" class="video-stream html5-main-video" controlslist="nodownload" style="width: 615px; height: 346px; left: 0px; top: 0px;" src="blob:https://www.youtube.com/f2e24726-595a-46d9-92af-9282412326b4"></video> By the way I opened a random youtube page and this is the link https://www.youtube.com/watch?v=jH9Ln-LoneA
Feb-11-2020, 02:56 AM
I was asking for the URL of the webpage you are scraping.
Feb-11-2020, 03:30 AM
Feb-11-2020, 05:35 AM
Downloading from YouTube is a snap with pytube: https://pypi.org/project/pytube/
Feb-11-2020, 05:46 AM
(Feb-11-2020, 05:35 AM)Larz60+ Wrote: Downloading from YouTube is a snap with pytube: https://pypi.org/project/pytube/Thank you. But I don't want to use any package. I want to learn the coding and hence I want to build it manually. Any guidance?
Feb-11-2020, 11:14 AM
the only thing I can advise would be to download the source of pytube and examine how they wrote the package. That will help you formulate your own package. Github source: https://github.com/hbmartin/pytube3
Feb-11-2020, 03:00 PM
(This post was last modified: Feb-11-2020, 03:55 PM by Man_from_India.)
(Feb-11-2020, 11:14 AM)Larz60+ Wrote: the only thing I can advise would be to download the source of pytube and examine how they wrote the package. That will help you formulate your own package. Github source: https://github.com/hbmartin/pytube3Thank you. But can we deal with blob objects (src="blob:https://www.youtube.com/f2e24726-595a-46d9-92af-9282412326b4">) in python? (Feb-11-2020, 11:14 AM)Larz60+ Wrote: the only thing I can advise would be to download the source of pytube and examine how they wrote the package. That will help you formulate your own package. Github source: https://github.com/hbmartin/pytube3 from pytube import YouTube yt = YouTube(url='https://www.youtube.com/watch?v=jH9Ln-LoneA') print(yt.title)After running this I am getting this error: KeyError: 'url_encoded_fmt_stream_map' |
|