bakapear / ytt

YouTubeTools
MIT License
6 stars 1 forks source link

util.parse error #5

Closed laBecasse closed 3 years ago

laBecasse commented 3 years ago

Hello, I realize that the util.parse function leads to errors, because some scrapped pages does not contain window["ytInitialData"] =, but var ytInitialData = instead.

So consider the following parse function solves my error:

parse: x => main.between(x, 'var ytInitialData = ', '};', 1)

Is it possible to support the both alternatives ?

laBecasse commented 3 years ago

I also found similar remarks in : https://github.com/ytdl-org/youtube-dl/pull/25734#issuecomment-686455736

bakapear commented 3 years ago

Thank you for pointing this out. I also noticed it this morning and will push a fix in a second!