2014-11-15, 14:46
(2014-11-15, 13:38)redviolet Wrote: VEVO problem is caused by a change in the way google generates signatures.Thanks very much... works great.
This code is the one creating a signature now, and current YoutubePlayer.py parser doesn't catch it.
Code:a.set("signature",cr(c));return a
This patch works for me, but further feedback will be welcome, especially if you can come up with a better regexp.
Code:--- a/YouTubePlayer.py
+++ b/YouTubePlayer.py
@@ -467,7 +467,7 @@ class YouTubePlayer():
return ''
# get main function name
- match = re.search("signature=([$a-zA-Z]+)\([^)]\)", playerData)
+ match = re.search("set..signature..([$a-zA-Z]+)\([^)]\)", playerData)
if match:
mainFunName = match.group(1)
I had to stare at your code for a while to figure out exactly how to apply your patch with me being so python dumb.
For those who are as python dumb as me with the code lingo above.
Replace line 470 in YouTubePlayer.py
from this...
PHP Code:
match = re.search("signature=([$a-zA-Z]+)\([^)]\)", playerData)
to this...
PHP Code:
match = re.search("set..signature..([$a-zA-Z]+)\([^)]\)", playerData)
[EDIT] Or better yet follow the post below... Thanks redviolet and tomer953