Kodi Community Forum

Full Version: [depricated] old YouTube Plugin - XBMC 13.0 Frodo/Gotham only
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a fix for login? (was working now suddenly stopped)
This fixes login for me.

Code:
--- a/plugin/YouTubeLogin.py
+++ b/plugin/YouTubeLogin.py
@@ -188,7 +188,7 @@ class YouTubeLogin():
             fetch_options = False

             # Check if we are logged in.
-            nick = self.common.parseDOM(ret["content"], "p", attrs={"class": "masthead-expanded-acct-sw-id2"})
+            nick = self.common.parseDOM(ret["content"], "span", attrs={"id": "yt-masthead-user-displayname"})

I can't get live streams to work though.

Code:
CurlFile::Open(0x7f0bf83a25d0) http://www.youtube.com/api/manifest/hls_playlist/id/0rrzPh1Ys5Y.1/itag/96/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/hls_chunk_host/www.youtube.com/gir/yes/dg_shard/0rrzPh1Ys5Y.1_96/cp/U0hXTlZOTl9FT0NON19OSFJKOkRRUzM1aE1XMzVG/maudio/1/playlist_type/LIVE/pmbypass/yes/sver/3/upn/XHV-w4HztuM/fexp/903903,911429,914093,916623,936118,938630,936910,936913,907231,907240,921090/ip/124.170.95.47/ipbits/8/expire/1389630905/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cmbypa
20:47:47 T:139688842815232 WARNING: FillBuffer: curl failed with code 22

Error 22 in curl means 403, so not sure how well logins are working. I do know that my subscriptions show up, so it seems like it works.
Hello there,

i am getteing crazy.
I tried everything, found in google, Forums and other.

I tried:
Unlinking my YouTube and Google+ account.
Turning on the two-factor authentication and turning off the two-factor authentication
Generating app-specific password.
Removing addon_data/plugin.video.youtube folder.
Reeinstall complete xbmc Confused
Tried every password and username include the @pages.plusgoogle.com


here is my log

http://xbmclogs.com/show.php?id=110113
(2014-01-13, 12:57)enigma83 Wrote: [ -> ]This fixes login for me.

Code:
--- a/plugin/YouTubeLogin.py
+++ b/plugin/YouTubeLogin.py
@@ -188,7 +188,7 @@ class YouTubeLogin():
             fetch_options = False

             # Check if we are logged in.
-            nick = self.common.parseDOM(ret["content"], "p", attrs={"class": "masthead-expanded-acct-sw-id2"})
+            nick = self.common.parseDOM(ret["content"], "span", attrs={"id": "yt-masthead-user-displayname"})

I can't get live streams to work though.

Code:
CurlFile::Open(0x7f0bf83a25d0) http://www.youtube.com/api/manifest/hls_playlist/id/0rrzPh1Ys5Y.1/itag/96/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/hls_chunk_host/www.youtube.com/gir/yes/dg_shard/0rrzPh1Ys5Y.1_96/cp/U0hXTlZOTl9FT0NON19OSFJKOkRRUzM1aE1XMzVG/maudio/1/playlist_type/LIVE/pmbypass/yes/sver/3/upn/XHV-w4HztuM/fexp/903903,911429,914093,916623,936118,938630,936910,936913,907231,907240,921090/ip/124.170.95.47/ipbits/8/expire/1389630905/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cmbypa
20:47:47 T:139688842815232 WARNING: FillBuffer: curl failed with code 22

Error 22 in curl means 403, so not sure how well logins are working. I do know that my subscriptions show up, so it seems like it works.


This works for me!!!!!!!!!!!!!!!!!!! After a lot of days!!!
(2014-01-13, 16:03)Pablo Martin Wrote: [ -> ]
(2014-01-13, 12:57)enigma83 Wrote: [ -> ]This fixes login for me.

Code:
--- a/plugin/YouTubeLogin.py
+++ b/plugin/YouTubeLogin.py
@@ -188,7 +188,7 @@ class YouTubeLogin():
             fetch_options = False

             # Check if we are logged in.
-            nick = self.common.parseDOM(ret["content"], "p", attrs={"class": "masthead-expanded-acct-sw-id2"})
+            nick = self.common.parseDOM(ret["content"], "span", attrs={"id": "yt-masthead-user-displayname"})

I can't get live streams to work though.

Code:
CurlFile::Open(0x7f0bf83a25d0) http://www.youtube.com/api/manifest/hls_playlist/id/0rrzPh1Ys5Y.1/itag/96/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/hls_chunk_host/www.youtube.com/gir/yes/dg_shard/0rrzPh1Ys5Y.1_96/cp/U0hXTlZOTl9FT0NON19OSFJKOkRRUzM1aE1XMzVG/maudio/1/playlist_type/LIVE/pmbypass/yes/sver/3/upn/XHV-w4HztuM/fexp/903903,911429,914093,916623,936118,938630,936910,936913,907231,907240,921090/ip/124.170.95.47/ipbits/8/expire/1389630905/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cmbypa
20:47:47 T:139688842815232 WARNING: FillBuffer: curl failed with code 22

Error 22 in curl means 403, so not sure how well logins are working. I do know that my subscriptions show up, so it seems like it works.


This works for me!!!!!!!!!!!!!!!!!!! After a lot of days!!!

What exactly i have to do, to use this fix ?

Thx for helping ...my hairs getting grey Wink

Nicole
log says : "the video you have requested has not been rated and may contain content intended for mature audiences"

logged using my account or logged out , same error
(2014-01-13, 12:57)enigma83 Wrote: [ -> ]This fixes login for me.

Code:
--- a/plugin/YouTubeLogin.py
+++ b/plugin/YouTubeLogin.py
@@ -188,7 +188,7 @@ class YouTubeLogin():
             fetch_options = False

             # Check if we are logged in.
-            nick = self.common.parseDOM(ret["content"], "p", attrs={"class": "masthead-expanded-acct-sw-id2"})
+            nick = self.common.parseDOM(ret["content"], "span", attrs={"id": "yt-masthead-user-displayname"})

I can't get live streams to work though.

Code:
CurlFile::Open(0x7f0bf83a25d0) http://www.youtube.com/api/manifest/hls_playlist/id/0rrzPh1Ys5Y.1/itag/96/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/hls_chunk_host/www.youtube.com/gir/yes/dg_shard/0rrzPh1Ys5Y.1_96/cp/U0hXTlZOTl9FT0NON19OSFJKOkRRUzM1aE1XMzVG/maudio/1/playlist_type/LIVE/pmbypass/yes/sver/3/upn/XHV-w4HztuM/fexp/903903,911429,914093,916623,936118,938630,936910,936913,907231,907240,921090/ip/124.170.95.47/ipbits/8/expire/1389630905/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cmbypa
20:47:47 T:139688842815232 WARNING: FillBuffer: curl failed with code 22

Error 22 in curl means 403, so not sure how well logins are working. I do know that my subscriptions show up, so it seems like it works.

(2014-01-13, 16:03)Pablo Martin Wrote: [ -> ]
(2014-01-13, 12:57)enigma83 Wrote: [ -> ]This fixes login for me.

Code:
--- a/plugin/YouTubeLogin.py
+++ b/plugin/YouTubeLogin.py
@@ -188,7 +188,7 @@ class YouTubeLogin():
             fetch_options = False

             # Check if we are logged in.
-            nick = self.common.parseDOM(ret["content"], "p", attrs={"class": "masthead-expanded-acct-sw-id2"})
+            nick = self.common.parseDOM(ret["content"], "span", attrs={"id": "yt-masthead-user-displayname"})

I can't get live streams to work though.

Code:
CurlFile::Open(0x7f0bf83a25d0) http://www.youtube.com/api/manifest/hls_playlist/id/0rrzPh1Ys5Y.1/itag/96/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/hls_chunk_host/www.youtube.com/gir/yes/dg_shard/0rrzPh1Ys5Y.1_96/cp/U0hXTlZOTl9FT0NON19OSFJKOkRRUzM1aE1XMzVG/maudio/1/playlist_type/LIVE/pmbypass/yes/sver/3/upn/XHV-w4HztuM/fexp/903903,911429,914093,916623,936118,938630,936910,936913,907231,907240,921090/ip/124.170.95.47/ipbits/8/expire/1389630905/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cmbypa
20:47:47 T:139688842815232 WARNING: FillBuffer: curl failed with code 22

Error 22 in curl means 403, so not sure how well logins are working. I do know that my subscriptions show up, so it seems like it works.


This works for me!!!!!!!!!!!!!!!!!!! After a lot of days!!!

Can any of you zip and send me the content of yours .xbmc/addon/plugin.video.youtube folder? I tried everything knappas and enigma suggested and still the same error, unable to login.

Quote:
20:07:52 T:139684985935808 ERROR: GetDirectory - Error getting plugin://plugin.video.youtube/?action=settings&path=%2froot%2flogin
20:07:52 T:139684985935808 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.youtube/?action=settings&path=%2froot%2flogin) failed
(2014-01-13, 16:03)Pablo Martin Wrote: [ -> ]This works for me!!!!!!!!!!!!!!!!!!! After a lot of days!!!

A good tips can be to backup your %xbmc home dir% / userdata / addon_data / plugin.video.youtube directory. I have manage to fuck up my login again Confused
when I tried the new suggestion that was coming up in the thread,
As my fix just fixed subscriptions and not "view later" and I was curious to see if this would fix that to...

However I wonder if it can caused of that I have 2 name on google, One is my alias "Knappas" that i prefer to use on youtube and one is my real name that google think I should use.
Every time i log in to youtube from a normal browser, youtube asks me which account I want to use.
I have tried to make youtube default to knappas, but no success... I also wonder how I manage to login last time I succeed to login ?

So remember if you manage to login, * DO A BACKUP * ! Smile

Best Regards,

Knappas
I just remember I must say that the other tip in the thread was *NOT* the cause for my fucked up.
The problem was that I did the change and then tried if I could see view later etc but no change there.
Then I think it maybe was because that code only run when you create your cookie-file so I tried to change my account and password, that was the mistake.... ARGH..... Smile

Best Regards,

Knappas
(2014-01-13, 12:57)enigma83 Wrote: [ -> ]This fixes login for me.

Code:
--- a/plugin/YouTubeLogin.py
+++ b/plugin/YouTubeLogin.py
@@ -188,7 +188,7 @@ class YouTubeLogin():
             fetch_options = False

             # Check if we are logged in.
-            nick = self.common.parseDOM(ret["content"], "p", attrs={"class": "masthead-expanded-acct-sw-id2"})
+            nick = self.common.parseDOM(ret["content"], "span", attrs={"id": "yt-masthead-user-displayname"})

I can't get live streams to work though.

Code:
CurlFile::Open(0x7f0bf83a25d0) http://www.youtube.com/api/manifest/hls_playlist/id/0rrzPh1Ys5Y.1/itag/96/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/newshard/yes/hls_chunk_host/www.youtube.com/gir/yes/dg_shard/0rrzPh1Ys5Y.1_96/cp/U0hXTlZOTl9FT0NON19OSFJKOkRRUzM1aE1XMzVG/maudio/1/playlist_type/LIVE/pmbypass/yes/sver/3/upn/XHV-w4HztuM/fexp/903903,911429,914093,916623,936118,938630,936910,936913,907231,907240,921090/ip/124.170.95.47/ipbits/8/expire/1389630905/sparams/ip,ipbits,expire,id,itag,source,ratebypass,live,cmbypa
20:47:47 T:139688842815232 WARNING: FillBuffer: curl failed with code 22

Error 22 in curl means 403, so not sure how well logins are working. I do know that my subscriptions show up, so it seems like it works.

You are a legend! Thank you so much.
Could someone pls have a little mercy and explain how to apply the fix from enigma83 ?

Thx alot

Nicole Wink
(2014-01-14, 15:55)sukkubus Wrote: [ -> ]Could someone pls have a little mercy and explain how to apply the fix from enigma83 ?

Thx alot

Nicole Wink

Me too .....All I see is code but ain't got a clue what to do. Huh
Hello,

Running XBMC 12.3 on Ubuntu 13.10 (64 bit) on my desktop PC.

I'm attemprting to troubleshoot why Youtube login fails. I've been following this guide:
http://code.google.com/p/youtubexbmc/wik...oginIssues

I have installed youtube plugin version 4.4.6 from the repository.

Unfortunately, the smallest log I've been able to generate is about 200,00 bytes when pastebin requires a log of 150,000 bytes or less.
So I get stuck at that point.

Is it OK to post the log to xbmclogs.com since (I think) it can handle larger logs?

Can I provide any more useful info to help diagnose this?
(2014-01-14, 18:07)digzz Wrote: [ -> ]
(2014-01-14, 15:55)sukkubus Wrote: [ -> ]Could someone pls have a little mercy and explain how to apply the fix from enigma83 ?

Thx alot

Nicole Wink

Me too .....All I see is code but ain't got a clue what to do. Huh

Find on your computer and open (eg with wordpad) the file: YouTubeLogin.py
Look for text string: nick = self.common.parseDOM(ret["content"], "p", attrs={"class": "masthead-expanded-acct-sw-id2"})
Replace that with: nick = self.common.parseDOM(ret["content"], "span", attrs={"id": "yt-masthead-user-displayname"})
Save and Exit
It worked for me as well!
I seem to still be having a problem. I tried the YouTubeLogin.py edit and that logs me into my main account fine but because of the Google+ implementation, I now have a specific channel for YouTube which is owned by the main account. Since all my playlists and my watch later videos have been sent to the new channel, logging into my main account doesn't fix anything. I tried the third party username and password but that doesn't work. Anyone have any tips?