Welcome to LIGHT Forum.......The place to be.......Enjoy your stay and have fun ....

Announcement

Collapse
No announcement yet.

YouTube by Taapat

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • YouTube by Taapat

    YouTube plugin tutorial

    Taapat says:

    Plugin works completely with youtube api v3 - but the authentication now does not work as before.

    Before this one had a plugin and used it with one's login and password.

    But now the plug-so gets full control over all your (Google) accounts.

    In fact, now one dooe not have to give one's details and one can allow the plugin to use only the necessary service.

    If the settings (button menu) includes authentication, then authentication has to be taken from your Web browser under your account.

    Open the homepage, enter the code which will show a plug-and allow plugins to use your account on youtube. Each of us has to do it individually. After authentication, you can use your own "fidi" and subscriptions.
    Sorry, I tried making sense of what appears to be an online translation of an original Russian text...

    As others have explained subsequently:

    One has to create one's own "Api Key" and replace the default in "YouTubeUi.py" file .

    A long but instructive tutorial: https://seo-michael.co.uk/how-to-cre...id-and-secret/ - it requests some patience!

    How to Create Your Own Youtube API Key, ID and Secret
    MJD on Feb 26, 2020 0 Comments Comments

    WARNING - THIS IS A LONG GUIDE. BUT HAVE A BIT OF PATIENCE AND YOU'LL GET THROUGH IT

    Below is a guide for creating your own Youtube API Key with ID and Secret. The reason for doing this is to eliminate any YouTube over quota limit messages you may get in Kodi and also allow access to your subscriptions etc.

    Go to developers.google.com & login to your Google account (you probably already will be but this step is added just to ensure you are)
    Now go to console.developers.google.com
    Click on Create Project in the top left



    You will now see a box labelled Project name. Give it a simple name you can easily recognise and then click Create



    Wait for the notification (top right) saying the project has been created



    Now click on the Google APIs logo in the top left



    Select Library from the left hand menu



    Scroll down and select YouTube Data API vX



    Select Enable on the next screen



    Select Create Credentials on the right hand side of the screen



    Click on the Dropdown Box



    Select YouTube Data API vX



    Now click on the Where will you be calling the API from dropdown box



    Select Web Server



    In the What data will you be accessing box check Public Data



    Now click on What credentials do I need?



    You will now see your API key. Click on Copy on the right hand side and then click done



    Now you have it copied save it to a text file as we need to now get the ID & secret
    After clicking done you will be back at the screen where we clicked on Library. Look on the left hand side again and click on OAuth consent screen



    Click External and then Create



    Enter a name (just use the same name as you did at the beginning)



    Scroll to the bottom and click Save



    Now click on Credentials in the left hand menu



    Now click Create Credentials in the top left



    Select OAuth Client ID



    Select Other give it a Name (use the same name as we did before) and click Create



    You will now see a box with your Client ID and Secret. Copy both and add to the text file where we saved the API key before



    Now open YouTube on Kodi
    Scroll down to Settings



    Highlight API in the left hand menu



    Now paste your API, Client ID and Secret in the corresponding boxes on the right and then click OK



    Now click on Sign In in the YouTube app on Kodi



    You will now see a message saying you need to sign in twice to your Google account



    Click ok and it will give you a code. Go google.com/device and enter the code. Then click on your account and verify it.
    A new code will then appear in the YouTube app so repeat the process
    When you enter the second it will say you cannot do this as the app is not verified. But it is you who created this so you can trust it. So in your browser (I'm using Chrome) click on Advanced



    Now click on Go to 'nameofkey' and allow your API access
    You will now be signed into YouTube and be able to access all your lists/likes etc.
    Using FileZilla Client FTP one goes to /usr/lib/enigma2/python/Plugins/Extensions/YouTube

    then, one deletes
    YouTubeVideoUrl.pyo and
    YouTubeVideoUrl.py

    See attached file YouTubeVideoUrl.py as an example.

    Upload it to /usr/lib/enigma2/python/Plugins/Extensions/YouTube

    Then, reboot...

    Or as George says:

    you have to create your own "Api Keys" , and than replace the default in "YouTubeUi.py" file .

    the file is in usr/lib/enigma2/python/Plugins/Extensions , and depends the image, the .py file may missing, and there will be only the .pyo

    in that case , you need to download the content from here: https://raw.githubusercontent.com/Ta...c/YouTubeUi.py

    and create a .py file .change the Api keys, place it in youtube foder, and reboot your receiver.
    Attached is a YT plugin and an example py file...

    YT plugin one isntalls like this, using PuTTy Telnet app:

    Code:
    opkg install -force-overwrite /tmp/*.ipk
    * = the exact name of the YT file you will install.
    Attached Files
    Last edited by gorski; 26-03-2020, 18:57.

  • #2
    Thanx to Enigma1969!

    enigma2-plugin-extensions-youtube_h1+git427+dfa62c4-r0.0_all

    -YouTubeUi: add some aditional checks on YouTube.key reading

    -Add possibility of read API keys from file …

    You can save file YouTube.key in folder /etc/enigma2 and use for own API keys
    Attached Files

    Comment


    • #3
      Here's the procedure:

      1) Create your API, as described.

      2) Install the ipk manually.

      3) Edit the key file.

      4) Restart!

      Done!

      Comment


      • #4
        enigma2-plugin-extensions-youtube_h1+git433+6550219-r0.0_all

        -remove keys from YouTube.key file

        -Change all autentification data

        -YouTubeUi: show error message on autentification error in OAuth

        -OAuth: fix verification_url initalization …

        This fix GSOD when you have problems with internet connection on autentification.

        thx @ Taapat
        Attached Files

        Comment


        • #5
          New version...

          ● YouTubeUi: update key reading from config file
          ● YouTubeUi: update imports and autentification
          ● YouTubeApi: add function GetKey
          Attached Files

          Comment


          • #6
            -Regenerate and update language files after latest changes

            -Follow YouTube branding guidelines ..

            Use YouTube logo for displayed YouTube content.

            Thefore in YouTubeMain screen move text widget content to title, to shown YouTube logo instead of text.

            Skiners, please use YouTube logo in skin instead of text widget to follow YouTube branding guidelines.

            Also changes images that are similar with YouTube icon.
            Attached Files

            Comment


            • #7
              New:
              YouTubeUi: remove quotes from api keys
              YouTubeVideoUrl: group some variables
              YouTubeVideoUrl: remove unused swf player url extraction
              Tabs to spaces in jsinterp and swfinterp
              Remove unused in jsinterp and swfinterp
              YouTubeVideoUrl: fix DRM videos detection
              YouTubeMain: remove widget text from default screens
              Update Readme to follow YouTube branding guidelines
              Attached Files

              Comment


              • #8
                ● Fix function calls without arguments
                ● YouTubeVideoUrl: remove Shockwave Flash player support
                I hope there are no more clips left on YouTube that contain usable links for enigma players only in the Shockwave Flash player.

                thx @ Taapat
                Attached Files

                Comment


                • #9
                  -YouTubeApi: remove unused after remove Favorites

                  -Update language files after remove Favorites

                  -Remove Favorites from private feeds

                  I think that youtube has not supported the special Favorites palylist for a long time. It only mislead users.

                  -Fix vido ID raise exception format
                  Attached Files

                  Comment


                  • #10
                    New version:

                    enigma2-plugin-extensions-youtube_h1+git478+3e096e2-r0.0_all

                    ● YouTubeVideoUrl: remove forgotten encoding in _parse_qsl

                    ● YouTubeVideoUrl: remove unused variables in functions

                    ● YouTubeVideoUrl: Use redirected video id if any, thx dstftw
                    Attached Files

                    Comment


                    • #11
                      -test_plugin: try to fix false travis build reports …

                      Looks like the videos in ello playlists have some regional limitations.

                      -YouTubeVideoUrl: Improve signature cipher extraction

                      Comment


                      • #12
                        Change httplib to urllib2
                        Attached Files

                        Comment


                        • #13
                          ACTIVATE YOUR DEVICE

                          Go to setting of YouTube app by starting YT app and pressing MENU button >

                          Login on startup > yes >



                          > you will have to authenticate the device's access to your API via your Google account.

                          Go to google.com/device on your PC/tablet/mobile phone/etc. >



                          > and put in the code from the TV screen now...

                          Usually one gets a warning message like this:



                          Continue by clicking on Advanced...



                          Then to APIkey4YT and you get this...



                          Click on Allow and wait for "Success" message...

                          Wait a bit on your STB and the little window will disappear...

                          Press green button on your remote...

                          All done! Search for stuff of YT app!
                          Last edited by gorski; 09-06-2020, 01:29.

                          Comment


                          • #14
                            ● YouTubeSearch: optimize get charset in getGoogleSuggestions

                            ● YouTubeVideoUrl: fix video extraction on Python3

                            ● 2to3 create Python 2 and 3 compatible code

                            ● Fix travis tests after last commit

                            ● Again try add python 3.8 in travis tests
                            Attached Files

                            Comment


                            • #15
                              ●Update latvian translation
                              ●Regenerate language files after config update
                              ●Update and fix search regions and languages
                              ●Fix Czech search language
                              ●Intruduce compat_ssl_urlopen for code optimization
                              ●YouTubeUi: some code readable optimization
                              ●Update travis tests credentials
                              Attached Files

                              Comment

                              Working...
                              X