How to get .mpd file for a youtube video

寵の児 提交于 2019-12-08 18:39:27

As I commented out, you could use the python library extract-youtube-mpd for that. But it requires python and Linux.

Through it's code, I've found these are the steps it follows plus extra ones if you like to create your own automation/extension:

1) Right click in page and select to show page's source code

2) search the HTML file (the one that will be shown) for "dashmpd"

3) extract the text within quotes, as in (e.g.): "dashmpd":"https://manifest.googlevideo.com/api/manifest/dash/ ... "_

4) replace "/" for "/" if needed (i.e. if not using regex). This will give you a source for a XML file

5) parse the XML, through periods, adaptation sets and representation settings (this is when it gets complicated)

Since I'm also in the need for this, I'll probably release a node module for this.. Will update here

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!