TOOLSP
"
WELCOME !

Please ! Use [CODE] tags for your LINKS and CODE.
Favor usar balisas [CODE] para sus vínculos y código.
Merci d'utiliser les balises [CODE] pour vos liens et code.

[code]http://Thank.you[/code]
"
*** GITHUB ***
.
.
URL Resolver [GIT]
.
.
.
.
Jx Update [REDIRECT]
.
.
*** Associated ***
.
Pastebin Your list online
.
mediafire Upload Files
.
imgur Upload Pics
lyngsat TV logos collection
transparent .png
.
http://hola.org free? VPN
Hola.apk free? VPN App.
.
hidester- free Proxy
.
webgrabplus EPG - Eng
xmltv EPG - Fr
kazer EPG - Fr
.
.wordreference Traduction
.
mail.com (fast sign-in)
.
.
Latest topics
» Regex for my favori serie
Sun 24 Sep - 21:12 by beezlo

» help regex
Fri 22 Sep - 21:08 by mickydoo

» I need i little help please!
Wed 20 Sep - 18:24 by jujuuj

» some help with vaughn or ustream .TV
Wed 20 Sep - 0:56 by adrianhn

» Xbmc tool box / Xbmc gui (Kodi)
Mon 18 Sep - 18:16 by oxus

» how to play this in kodi
Mon 11 Sep - 8:25 by retrorat1

» Where to put your list
Sun 10 Sep - 14:29 by oxus

FRIENDS / PARTNERS

forum

créer un forum


Xbmc tool box / Xbmc gui (Kodi)

Page 2 of 2 Previous  1, 2

View previous topic View next topic Go down

Re: Xbmc tool box / Xbmc gui (Kodi)

Post by jujuuj on Sun 4 Jun - 1:01

I need some holidays too Smile
avatar
jujuuj

Messages : 88
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Re: Xbmc tool box / Xbmc gui (Kodi)

Post by twogun on Wed 7 Jun - 7:43

What a weekend.  I've looked in here a couple of times, but haven't had the time to post.  

I've modified Shani's password protected code.  This version will save the password and reuse it.  There is no limit on the reuse of the password.  If for some reason the saved password fails (password changes, wrong password entered, pass file is damaged/deleted, etc)  it will simply ask for the password again and save it again.  The password is encoded with base64.  Not really secure, but at least it isn't human readable.  It is saved in a file called "pass" in the LSP userdata directory.  I have attempted to make this code universal by using xbmc.translatePath.  Hopefully it will work for everyone.


Code:
<item>
<title>Password protected w/ recorded password - Big Buck Bunny (password = test)</title>
<link>$doregex[getinput]</link>

<regex>
<name>getinput</name>

<expres><![CDATA[#$pyFunction
import xbmcgui,xbmc, xbmcaddon, time, base64

def GetLSProData(page_data,Cookie_Jar,m):
    path = xbmc.translatePath("special://profile/addon_data/" + "plugin.video.live.streamspro/pass")
    try:
        f = open(path, 'r')
        solution = f.read()
        f.close()
        if base64.b64decode(solution) == 'test':
            return play()
    except:
        pass
    txt='Enter Password?'
    addon = xbmcaddon.Addon('plugin.video.live.streamspro')
    addon_version = addon.getAddonInfo('version')
    profile = xbmc.translatePath(addon.getAddonInfo('profile').decode('utf-8'))

    solver = InputWindow( txt=txt)
    solution = solver.get()

    f = open(path, 'w')
    f.write(base64.b64encode(solution))
    f.close()

    if solution == 'test':
        return play()
    else:
        return ''

class InputWindow(xbmcgui.WindowDialog):
    def __init__(self, *args, **kwargs):

        self.txt = kwargs.get('txt','')

        xbmcgui.WindowXMLDialog.__init__(self)
        #self.addControl(self.txt)
        path = xbmcaddon.Addon().getAddonInfo('path')
        self.kbd = xbmc.Keyboard()
        self.kbd.setHeading( self.txt)

    def get(self):
        self.show()
        time.sleep(2)
        self.kbd.doModal()
        if (self.kbd.isConfirmed()):
            text = self.kbd.getText()
            self.close()
            return text
        self.close()
        return False

def play():
    return 'http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4'
]]></expres>
<page></page>
</regex>
</item>
avatar
twogun

Messages : 33
Date d'inscription : 2017-04-03

View user profile

Back to top Go down

Re: Xbmc tool box / Xbmc gui (Kodi)

Post by jujuuj on Wed 7 Jun - 9:11

Amazing !
I Have to test this !

the frog is ... K.O.
avatar
jujuuj

Messages : 88
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Re: Xbmc tool box / Xbmc gui (Kodi)

Post by mickydoo on Wed 7 Jun - 15:50

@jujuju @twogun
A real regal your box to dialogs
thanks

mickydoo

Messages : 9
Date d'inscription : 2017-05-10

View user profile

Back to top Go down

Re: Xbmc tool box / Xbmc gui (Kodi)

Post by jujuuj on Fri 9 Jun - 2:50

@twogun

Please adapt your password protected and recorded solution
and help me/us with an

DOUBLEusernameANDpassword protected and DOUBLErecorded solution

here is the item we have, please add the "record" option for both username and password : Thanks a lot for your help !

Code:


<item>
<title>( username = ?  password = ? )</title>             
<thumbnail>NA</thumbnail>
<link>NA</link>
<externallink>$doregex[getinput]</externallink>

<regex>
<name>getinput</name>
<expres><![CDATA[#$pyFunction
import xbmcgui,xbmc, xbmcaddon, time
def GetLSProData(page_data, Cookie_Jar,m, txt1='Enter Username?', txt2='Enter Password?'):
    addon = xbmcaddon.Addon('plugin.video.live.streamspro')
    addon_version = addon.getAddonInfo('version')
    profile = xbmc.translatePath(addon.getAddonInfo('profile').decode('utf-8'))
    solver = InputWindow( txt=txt1)
    solution1 = solver.get()
    solver = InputWindow( txt=txt2)
    solution2 = solver.get()
    return 'http://hidden.php?username=' + solution1 + '&amp;password=' + solution2

class InputWindow(xbmcgui.WindowDialog):
    def __init__(self, *args, **kwargs):
        self.txt = kwargs.get('txt','')
        xbmcgui.WindowXMLDialog.__init__(self)
        #self.addControl(self.txt)
        path = xbmcaddon.Addon().getAddonInfo('path')
        self.kbd = xbmc.Keyboard()
        self.kbd.setHeading( self.txt)
    def get(self):
        self.show()
        time.sleep(2)
        self.kbd.doModal()
        if (self.kbd.isConfirmed()):
            text = self.kbd.getText()
            self.close()
            return text
        self.close()
        return False
]]></expres>
<page></page>
</regex>
</item>
 
 


Bye all ! Thanks for reading !
avatar
jujuuj

Messages : 88
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Ahora 10 de verdad / Maintenant 10 pour de vrai (Youtube)

Post by jujuuj on Sat 24 Jun - 2:45

twogun wrote:This next code allow you to search youtube via input window.  It will return the next 10 pages of results (or the max number of pages if it is less then 10 pages)

@jujuuj feel free to use this to search for "Big Buck Bunny"

In all seriousness though.  You could easily edit this to give a second input window asking for the number of pages you wish to limit the search to.

Code:

<item>
<title>xbmc input windows. Youtube Search 10 pages</title>
<link>$doregex[makelist]</link>
<thumbnail>http://vignette3.wikia.nocookie.net/logopedia/images/7/76/Youtube-logo_2005-2009.jpg</thumbnail>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param2]</title>
<link>$doregex[resolve]</link>
<thumbnail>https://i.ytimg.com/vi/[makelist.param1]/hqdefault.jpg</thumbnail>
]]></listrepeat>
<expres>u'(.+?)', u'(.+?)'</expres>
<page>$doregex[search]</page>
</regex>

<regex>
<name>resolve</name>
<expres><![CDATA[#$pyFunction
import urlresolver
def GetLSProData(page_data,Cookie_Jar,m):
 url = 'https://www.youtube.com/watch?v=[makelist.param1]'
 streamLink = urlresolver.resolve(url)
 return streamLink
]]></expres>
<page></page>
</regex>

<regex>
<name>search</name>
<expres><![CDATA[#$pyFunction
import requests,xbmcgui,xbmc, re,time, xbmcaddon
def GetLSProData(page_data,Cookie_Jar,m):

 text=takeInputFortext('Enter search string')
 url = 'https://www.youtube.com/results?q=' + text.replace(' ', '+')
 req = requests.get(url)
 list1 = re.findall('yt-lockup-c.+?a\shref=".watch.v=([^"]+)".+?\s\stitle="([^"]+)"\s', req.text)

 count = 10
 while count > 1:
   try:
     url = 'https://www.youtube.com' + re.findall('a href="([^"]+)".+Next', req.text)[0]
   except:
     return list1
   req = requests.get(url)
   list2 = re.findall('yt-lockup-c.+?a\shref=".watch.v=([^"]+)".+?\s\stitle="([^"]+)"\s', req.text)
   list1 = list1 + list2
   count = count - 1
 return list1

def takeInputFortext(txt):
 addon = xbmcaddon.Addon('plugin.video.live.streamspro')
 addon_version = addon.getAddonInfo('version')
 profile = xbmc.translatePath(addon.getAddonInfo('profile').decode('utf-8'))
 
 solver = InputWindow( txt=txt)
 solution = solver.get()
 return solution

class InputWindow(xbmcgui.WindowDialog):
    def __init__(self, *args, **kwargs):
        
        self.txt = kwargs.get('txt','')

        xbmcgui.WindowXMLDialog.__init__(self)
        #self.addControl(self.txt)
        path = xbmcaddon.Addon().getAddonInfo('path')
        self.kbd = xbmc.Keyboard()
        self.kbd.setHeading( self.txt)

    def get(self):
        self.show()
        time.sleep(2)
        self.kbd.doModal()
        if (self.kbd.isConfirmed()):
            text = self.kbd.getText()
            self.close()
            return text
        self.close()
        return False
]]></expres>
<page></page>
</regex>
</item>


After watching 12 versions of the movie big buck bunny, in the item  "Youtube Search (10 pages)", I realized that it was only showing 1 page and not the 10 promised by twogun ...
... and there were a very simple reason : my youtube is not English, my youtube is of a FOREIGN LANGUAGE ; so I checked in source code and ... where it should be written "Next" , it is in fact "Siguiente" or "Suivante".   So you will have to adapt the code depending on language :
change the word ' Next  '  in the code
    url = 'https://www.youtube.com' + re.findall('a href="([^"]+)".+Next', req.text)[0]
    url = 'https://www.youtube.com' + re.findall('a href="([^"]+)".+Siguiente', req.text)[0]
    url = 'https://www.youtube.com' + re.findall('a href="([^"]+)".+Suivante', req.text)[0]
avatar
jujuuj

Messages : 88
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Youtube Search 10 pages (any language)

Post by jujuuj on Sun 25 Jun - 1:40

This one will work, no matter your language :

Code:

<item>
<title>xbmc input windows. Youtube Search 10 pages  (by twogun)</title>
<link>$doregex[makelist]</link>
<thumbnail>http://vignette3.wikia.nocookie.net/logopedia/images/7/76/Youtube-logo_2005-2009.jpg</thumbnail>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param2]</title>
<link>$doregex[resolve]</link>
<thumbnail>https://i.ytimg.com/vi/[makelist.param1]/hqdefault.jpg</thumbnail>
]]></listrepeat>
<expres>u'(.+?)', u'(.+?)'</expres>
<page>$doregex[search]</page>
</regex>

<regex>
<name>resolve</name>
<expres><![CDATA[#$pyFunction
import urlresolver
def GetLSProData(page_data,Cookie_Jar,m):
 url = 'https://www.youtube.com/watch?v=[makelist.param1]'
 streamLink = urlresolver.resolve(url)
 return streamLink
]]></expres>
<page></page>
</regex>

<regex>
<name>search</name>
<expres><![CDATA[#$pyFunction
import requests,xbmcgui,xbmc, re,time, xbmcaddon
def GetLSProData(page_data,Cookie_Jar,m):

 text=takeInputFortext('Enter search string')
 url = 'https://www.youtube.com/results?q=' + text.replace(' ', '+')
 req = requests.get(url)
 list1 = re.findall('yt-lockup-c.+?a\shref=".watch.v=([^"]+)".+?\s\stitle="([^"]+)"\s', req.text)

 count = 10
 while count > 1:
   try:
     url = 'https://www.youtube.com' + re.findall('a href="([^"]+)".+<\/a>\n <\/div>', req.text)[0]
   except:
     return list1
   req = requests.get(url)
   list2 = re.findall('yt-lockup-c.+?a\shref=".watch.v=([^"]+)".+?\s\stitle="([^"]+)"\s', req.text)
   list1 = list1 + list2
   count = count - 1
 return list1

def takeInputFortext(txt):
 addon = xbmcaddon.Addon('plugin.video.live.streamspro')
 addon_version = addon.getAddonInfo('version')
 profile = xbmc.translatePath(addon.getAddonInfo('profile').decode('utf-8'))
 
 solver = InputWindow( txt=txt)
 solution = solver.get()
 return solution

class InputWindow(xbmcgui.WindowDialog):
    def __init__(self, *args, **kwargs):
        
        self.txt = kwargs.get('txt','')

        xbmcgui.WindowXMLDialog.__init__(self)
        #self.addControl(self.txt)
        path = xbmcaddon.Addon().getAddonInfo('path')
        self.kbd = xbmc.Keyboard()
        self.kbd.setHeading( self.txt)

    def get(self):
        self.show()
        time.sleep(2)
        self.kbd.doModal()
        if (self.kbd.isConfirmed()):
            text = self.kbd.getText()
            self.close()
            return text
        self.close()
        return False
]]></expres>
<page></page>
</regex>
</item>
avatar
jujuuj

Messages : 88
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Re: Xbmc tool box / Xbmc gui (Kodi)

Post by jujuuj on Wed 28 Jun - 15:04

I am going to add  an historic to this youtube item ...
now that I know I can (in the code of an ITEM) save some data, and then reuse it latter ...
____ with that : ____
  f = open(path, 'w')
f.write(solution)
f.close()
____ and that : ____
       f = open(path, 'r')
       solution = f.read()
       f.close()
       return solution
avatar
jujuuj

Messages : 88
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Re: Xbmc tool box / Xbmc gui (Kodi)

Post by Jason on Sat 1 Jul - 3:08

hello Guys

it is possible to play automatically a video when entering LiveStreamsPro? When video finished, then displayed my channel list?

It is possible?

thank u Guys


Jason

Jason

Messages : 11
Date d'inscription : 2017-06-18

View user profile

Back to top Go down

Re: Xbmc tool box / Xbmc gui (Kodi)

Post by jujuuj on Sun 2 Jul - 1:46

@jason, > NO Neutral
avatar
jujuuj

Messages : 88
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

correction ...

Post by jujuuj on Sun 2 Jul - 1:55

jujuuj wrote:not a bad idea ...  not sure it's possible though ..

that would be like that ?  (... never tried...)
Code:

    ret = dialog.select('Choose a regex ?', ['the regex 1', 'the regex 2'])
    RegexS = ['$doregex[One]','$doregex[Two]']
    return RegexS[ret]


After checking,  you can NOT put the entire term '$doregex[One]'  in the RegexS list  (because it would run the regex (assuming there are some opening windows inside or direct PY orders, it will cause disorder)

But, you can do it without the $ :
Code:

    ret = dialog.select('Choose a regex ?', ['the regex 1', 'the regex 2'])
    RegexS = ['doregex[One]','doregex[Two]']
    return RegexS[ret]
and then you can run the regex just adding the $ before ...
the link would be <link>$[makelistChoose.param2] </link>     ... to run regex one or two, depending on choice.
avatar
jujuuj

Messages : 88
Date d'inscription : 2017-03-28

View user profile

Back to top Go down

Re: Xbmc tool box / Xbmc gui (Kodi)

Post by oxus on Mon 18 Sep - 18:16

Youtube pagination is not working anymore.
Can you help us with this?
Thanks!
jujuuj wrote:This one will work, no matter your language :

Code:

<item>
<title>xbmc input windows. Youtube Search 10 pages  (by twogun)</title>
<link>$doregex[makelist]</link>
<thumbnail>http://vignette3.wikia.nocookie.net/logopedia/images/7/76/Youtube-logo_2005-2009.jpg</thumbnail>
<regex>
<name>makelist</name>
<listrepeat><![CDATA[
<title>[makelist.param2]</title>
<link>$doregex[resolve]</link>
<thumbnail>https://i.ytimg.com/vi/[makelist.param1]/hqdefault.jpg</thumbnail>
]]></listrepeat>
<expres>u'(.+?)', u'(.+?)'</expres>
<page>$doregex[search]</page>
</regex>

<regex>
<name>resolve</name>
<expres><![CDATA[#$pyFunction
import urlresolver
def GetLSProData(page_data,Cookie_Jar,m):
 url = 'https://www.youtube.com/watch?v=[makelist.param1]'
 streamLink = urlresolver.resolve(url)
 return streamLink
]]></expres>
<page></page>
</regex>

<regex>
<name>search</name>
<expres><![CDATA[#$pyFunction
import requests,xbmcgui,xbmc, re,time, xbmcaddon
def GetLSProData(page_data,Cookie_Jar,m):

 text=takeInputFortext('Enter search string')
 url = 'https://www.youtube.com/results?q=' + text.replace(' ', '+')
 req = requests.get(url)
 list1 = re.findall('yt-lockup-c.+?a\shref=".watch.v=([^"]+)".+?\s\stitle="([^"]+)"\s', req.text)

 count = 10
 while count > 1:
   try:
     url = 'https://www.youtube.com' + re.findall('a href="([^"]+)".+<\/a>\n <\/div>', req.text)[0]
   except:
     return list1
   req = requests.get(url)
   list2 = re.findall('yt-lockup-c.+?a\shref=".watch.v=([^"]+)".+?\s\stitle="([^"]+)"\s', req.text)
   list1 = list1 + list2
   count = count - 1
 return list1

def takeInputFortext(txt):
 addon = xbmcaddon.Addon('plugin.video.live.streamspro')
 addon_version = addon.getAddonInfo('version')
 profile = xbmc.translatePath(addon.getAddonInfo('profile').decode('utf-8'))
 
 solver = InputWindow( txt=txt)
 solution = solver.get()
 return solution

class InputWindow(xbmcgui.WindowDialog):
    def __init__(self, *args, **kwargs):
        
        self.txt = kwargs.get('txt','')

        xbmcgui.WindowXMLDialog.__init__(self)
        #self.addControl(self.txt)
        path = xbmcaddon.Addon().getAddonInfo('path')
        self.kbd = xbmc.Keyboard()
        self.kbd.setHeading( self.txt)

    def get(self):
        self.show()
        time.sleep(2)
        self.kbd.doModal()
        if (self.kbd.isConfirmed()):
            text = self.kbd.getText()
            self.close()
            return text
        self.close()
        return False
]]></expres>
<page></page>
</regex>
</item>

oxus

Messages : 8
Date d'inscription : 2017-04-17

View user profile

Back to top Go down

Page 2 of 2 Previous  1, 2

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum