2012-01-25, 00:25
FRWH Wrote:For some reason the fix didn't work for me, so if it's useful for anybody, here's my fix:
Open YouTubePlayer.py and look for this code (like the original fix):
Code:data = result
data = data[data.find('flashvars'):].replace("\n", "").replace("&", "&")
data = re.findall('="(ttsurl=.*?)"', data)
if len(data) > 0:
player_object = self._convertFlashVars(data[0])
Replace the line
withCode:data = re.findall('="(ttsurl=.*?)"', data)
Code:data = data[11:data.find('"', 12)]
And the line
withCode:player_object = self._convertFlashVars(data[0])
(just remove the "[0]" at the end).Code:player_object = self._convertFlashVars(data)
Take care with the indentation!
I just wanted to thank you for the fix.
Nice python fu!!