ChristianKreuzberger / extract-youtube-mpd

A Python script to extract youtubes MPD file and print the information to the console
14 stars 13 forks source link

Line mpdurl = html[html.find("dashmpd"):] returns empty #2

Open simonovskifilip opened 5 years ago

simonovskifilip commented 5 years ago

I am trying to execute the script using this command line python3 extract.py https://www.youtube.com/watch?v=2d1VrCvdzbY test.mpd

But I don't seem to get a result or output.

Output:

File "extract.py", line 69, in mpdurl = html[html.find("dashmpd"):] TypeError: a bytes-like object is required, not 'str'

I have tried to fix this output with some .encode() next to the strings, and this solved at first the problem but it is still not returning an output.

It seems it is not able to find a result at line 69. Maybe the parameter is not called anymore "dashmpd"?

ChristianKreuzberger commented 4 years ago

Maybe the parameter is not called anymore "dashmpd"?

I'm guessing that that's the case, youtube probably has modified how things work since I have released this tool.

chaijunkun commented 1 year ago

actually, After reviewing the python code, I find it just try to find a html node with "dashmpd", but today's youtube player page no longer contains such node anymore. maybe we can get some idea from youtube-dl. that tool works fine so far at least.