Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Blob object
#1
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?
Reply
#2
The URL would be most helpful.
Also tag and parents
Reply
#3
(Feb-10-2020, 05:38 PM)Larz60+ Wrote: The URL would be most helpful.
Also tag and parents
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
Reply
#4
I was asking for the URL of the webpage you are scraping.
Reply
#5
(Feb-11-2020, 02:56 AM)Larz60+ Wrote: I was asking for the URL of the webpage you are scraping.
Well let me explain what I was doing. I was making a YouTube downloader. So I picked up any random page. For our purposes we can use the url I posted above.
Reply
#6
Downloading from YouTube is a snap with pytube: https://pypi.org/project/pytube/
Reply
#7
(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?
Reply
#8
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
Reply
#9
(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
Thank 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'
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020