Closed thenhawke closed 2 years ago
The interesting thing I've noticed is that it only happens with music. Other types of videos don't have this problem.
same problem
So I've found the problem. The actions object name in /player/*/player_ias.vflset/en_US/base.js
is now $z
. Because of this, this regex will fail. We interpolate $z
into the regex expression, but $
is a special character. I have fixed this by escaping the parameters with regexp.QuoteMeta
:
regex, err := regexp.Compile(fmt.Sprintf("(?:a=)?%s\\.(%s|%s|%s)\\(a,(\\d+)\\)", regexp.QuoteMeta(string(obj)), regexp.QuoteMeta(reverseKey), regexp.QuoteMeta(spliceKey), regexp.QuoteMeta(swapKey)))
@corny Is this an acceptable fix? If so, I would gladly open a PR.
In other news, there is now an issue where youtube will randomly disconnect your streaming session :/
I'll go ahead and open that PR and we can discuss the fix there.
Thanks a lot for figuring this out!
The URLs returned from GetStreamURL() have started throwing an HTTP 403 when accessed. Code I'm using is below. This has been working up until very recently, perhaps YouTube has changed the way the URL must be crafted slightly?