2013-03-21, 01:12
(2013-03-21, 00:48)Kaylakaze Wrote: Fixed it. from line 299 in YouTubePlayer, change
Code:if line.strip().startswith("yt.playerConfig = "):
found = True
p1 = line.find("=")
p2 = line.rfind(";")
if p1 <= 0 or p2 <= 0:
continue
data = line[p1 + 1:p2]
break
to
Code:index = line.find("ytplayer.config =")
if index != -1:
found = True
p1 = line.find("=", (index-3))
p2 = line.rfind(";")
if p1 <= 0 or p2 <= 0:
continue
data = line[p1 + 1:p2]
break
sorry that the indents are not properly aligned in the code pasting
This demonstrates why whenever you're scraping a web page, it's dangerous to assume where on the page something will be located. Youtube changed their page format so that ytplayer.config is no longer at the beginning of a line.
Thanks for your input. I have tried amending as stated above. Unfortunately, nothing happens and the same error still occurs.
Would you be able to provide your YoutubePlayer.py ?
Thanks.
________________________________________________________________________________
Xbmc Frodo 12.1
Youtube 4.4.3