2014-05-24, 13:05
I think the login problem was fixed in here
https://code.google.com/p/youtubexbmc/is...ail?id=115
Works for me but after I login none of the Youtube Videos are playing now.. Any help guys?
https://code.google.com/p/youtubexbmc/is...ail?id=115
Quote:In YouTubeLogin.py:
At the top, alongside the other imports, add:
import urlparse
(needed further down)
As per #9 replace:
nick = self.common.parseDOM(ret["content"], "p", attrs={"class": "masthead-expanded-acct-sw-id2"})
with:
nick = self.common.parseDOM(ret["content"], "span", attrs={"id": "yt-masthead-user-displayname"})
(needed to check logged-in state)
Replace:
new_part = self.common.parseDOM(ret["content"], "form", attrs={"name": "verifyForm"}, ret="action")
with:
new_part = self.common.parseDOM(ret["content"], "form", attrs={"id": "gaia_secondfactorform"}, ret="action")
(DOM changed)
On the next line, replace:
fetch_options = {"link": new_part[0].replace("&", "&"), "url_data": url_data, "referer": ret["location"]}
with:
fetch_options = {"link": urlparse.urljoin(ret["location"],new_part[0]), "url_data": url_data, "referer": ret["location"]}
(extracted URL from new_part is relative. Needs to be converted to absolute URL using urlparse.urljoin, from import above)
Replace:
form = self.common.parseDOM(content, "form", attrs={"name": "verifyForm"}, ret=True)
with:
form = self.common.parseDOM(content, "form", attrs={"id": "gaia_secondfactorform"}, ret=True)
form[0] = form[0].replace(self.common.parseDOM(form, "div", attrs={"id": "newcode-content"}, ret=True)[0],"")
(DOM changed, second replacement line removes from the inputs from the form that are used for alternative methods of getting the code)
Works for me but after I login none of the Youtube Videos are playing now.. Any help guys?