stumbled into some problems with ytsr
narrowed it down to the cutAfterJSON function, which is based on ytdl-core's utils#cutAfterJSON function
the function only does a simple lookup if the previous character is a backslash when it checks for the end of strings
if e.g. the channelname ends with a backslash that translates to "xxx\\" which lets the cutAfterJSON function fail
low priority issue
tried the ytdl-core#getInfo on one of the channels videos and it succeeded
guess the function is not always used to retrieve the json
opening this issue instead of a pr since i feel like using a regex like [^\\]\\(\\\\)* or even a backwards loop suck performance wise and i am unable to come up with sth better
stumbled into some problems with ytsr narrowed it down to the cutAfterJSON function, which is based on ytdl-core's utils#cutAfterJSON function
the function only does a simple lookup if the previous character is a backslash when it checks for the end of strings if e.g. the channelname ends with a backslash that translates to
"xxx\\"
which lets the cutAfterJSON function faillow priority issue tried the ytdl-core#getInfo on one of the channels videos and it succeeded guess the function is not always used to retrieve the json
problematic line: https://github.com/fent/node-ytdl-core/blob/master/lib/utils.js#L81
code to reproduce:
opening this issue instead of a pr since i feel like using a regex like
[^\\]\\(\\\\)*
or even a backwards loop suck performance wise and i am unable to come up with sth betterChannel that Errors: https://www.youtube.com/channel/UC7Dk-eKv2KB7EO28UsFzqdg Related issue: https://github.com/TimeForANinja/node-ytsr/issues/98