Domba
Domba

Reputation: 77

Accessing youtube video stream map (python)

I'm trying to write a python script that will download a youtube video, using this line of code for getting the download url:

download_url = "http://www.youtube.com/get_video?video_id={0}&t={1}&fmt=22&asv=2".format(video_id, token_value)

(video_id and token_values being info I've got from parsing youtube video url) but this keeps downloading empty file.

Since this method is old, is there now some other form of getting download url for youtube videos?

Upvotes: 1

Views: 573

Answers (1)

Domba
Domba

Reputation: 77

I solved my problem (to some extent) in the meantime. I just had to access youtube video stream map and grab one of the URLs stored there and download the file. However, this works only on videos that don't have their signature encrypted. I'm still working on a solution for videos with encrypted signatures.

Upvotes: 1

Related Questions