2014-05-22, 11:36
The test version works for me. Before I couldn't log in on Gotham (Openelec 4).
so thanks for this.
so thanks for this.
(2014-05-18, 12:49)Skipmode A1 Wrote: I've tested the login stuff on a xbmc 12 (update through install from zip) and on a fresh xbmc 13.0 (install from zip). Login worked on both.
Fiddled a bit with a polish xbmc 13 and youtube and that seemed to work. However i'm not really sure i tested the exact bug...
Anyway here's a testversion: http://www.mediafire.com/download/txbtxv...ersion.zip
Please test
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)