Esempio n. 1
0
 def onFocus(self, controlId):
     self.controlId = controlId
     #fullscreen end return focus menu
     if controlId == 40:
         while xbmc.Player().isPlaying():
             xbmc.sleep(500)
             if not xbmc.Player().isPlaying():
                 self.setFocusId(9000)
Esempio n. 2
0
def play__():  #Lancer les liens
    oGui = cGui()

    oInputParameterHandler = cInputParameterHandler()
    sUrl = oInputParameterHandler.getValue('siteUrl').replace('P_L_U_S', '+')
    sTitle = oInputParameterHandler.getValue('sMovieTitle')
    sThumbnail = oInputParameterHandler.getValue('sThumbnail')

    #Special url with tag
    if '[' in sUrl and ']' in sUrl:
        sUrl = GetRealUrl(sUrl)

    playmode = ''

    if playmode == 0:
        stype = ''
        if '.ts' in sUrl:
            stype = 'TSDOWNLOADER'
        elif '.m3u' in sUrl:
            stype = 'HLS'
        if stype:
            from F4mProxy import f4mProxyHelper
            f4mp = f4mProxyHelper()
            xbmcplugin.endOfDirectory(int(sys.argv[1]), cacheToDisc=False)
            f4mp.playF4mLink(sUrl,
                             sTitle,
                             proxy=None,
                             use_proxy_for_chunks=False,
                             maxbitrate=0,
                             simpleDownloader=False,
                             auth=None,
                             streamtype=stype,
                             setResolved=False,
                             swf=None,
                             callbackpath="",
                             callbackparam="",
                             iconImage=sThumbnail)
            return

    listitem = xbmcgui.ListItem(sTitle,
                                iconImage="DefaultVideo.png",
                                thumbnailImage=sThumbnail)
    listitem.setInfo('video', {'Title': sTitle})
    listitem.setProperty("IsPlayable", "true")
    #xbmc.Player().play(sUrl, listitem)

    if 'f4mTester' in sUrl:
        xbmc.executebuiltin('XBMC.RunPlugin(' + sUrl + ')')
    else:
        xbmc.Player().play(sUrl, listitem)
    return
Esempio n. 3
0
def play2__():#Lancer les liens iptv
    oGui = cGui()

    oInputParameterHandler = cInputParameterHandler()
    sUrl = oInputParameterHandler.getValue('siteUrl').replace('P_L_U_S', '+')
    sTitle = oInputParameterHandler.getValue('sMovieTitle')
    sThumbnail = oInputParameterHandler.getValue('sThumbnail')

    listitem = xbmcgui.ListItem(sTitle, iconImage="DefaultVideo.png", thumbnailImage=sThumbnail)
    listitem.setInfo('video', {'Title': sTitle})
    listitem.setProperty("IsPlayable", "true")
    #xbmc.Player().play(sUrl, listitem)


    if 'f4mTester' in sUrl:
        if not xbmc.executebuiltin('XBMC.RunPlugin(' + sUrl + ')'): 
            dialog().VSerror('Verifer fM4Tester')
    else:
        if not xbmc.Player().play(sUrl, listitem):
            dialog().VSerror('Connexion Impossible')

    return
Esempio n. 4
0
def showHosters(sSearch=''):  #affiche les videos disponible du live
    oGui = cGui()
    oInputParameterHandler = cInputParameterHandler()
    sUrl4 = oInputParameterHandler.getValue('siteUrl4')
    sMovieTitle2 = oInputParameterHandler.getValue('sMovieTitle2')
    sThumb = oInputParameterHandler.getValue('sThumb')

    oRequestHandler = cRequestHandler(sUrl4)
    sHtmlContent = oRequestHandler.request()

    oParser = cParser()
    if not 'aliez' in sUrl4:
        sPattern = '<td bgcolor=".+?" *align="center".+?\s*<iframe.+?src="([^"]+)".+?</iframe>'
    elif 'youtube' or 'aliez' or 'laola1tv' in sUrl4:
        sPattern = '</script>\s*<iframe.+?src="([^"]+)".+?</iframe>\s*</td>'
    else:
        sPattern = '<td bgcolor=".+?" *align="center".+?\s*<iframe.+?src="([^"]+)".+?</iframe>'

    liste_url = []

    aResult = oParser.parse(sHtmlContent, sPattern)

    if (aResult[0]):

        sHosterUrl = ''

        url = aResult[1][0]

        #url = 'http://www.sporcanli.com/frame2.html' #a garder peut etre utils pour ajouter un hébergeur

        VSlog(url)
        if 'emb.aliez.me' in url:  #Terminer
            Referer = url
            UA = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0'
            oRequestHandler = cRequestHandler(url)
            oRequestHandler.addHeaderEntry('User-Agent', UA)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = 'source: *\'(.+?)\''
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult:
                sHosterUrl = aResult[
                    0] + '|User-Agent=' + UA + '&referer=' + Referer
                VSlog(sHosterUrl)

        if 'emb.aliez.me' in url:  #obligatoire pour fixer bug 403
            UA = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0'
            oRequestHandler = cRequestHandler(url)
            oRequestHandler.addHeaderEntry('User-Agent', UA)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = 'source: *\'(http://a3.aliez.me.+?)\''
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult:
                sHosterUrl = aResult[0] + '|User-Agent=' + UA
                VSlog(sHosterUrl)

        if 'sport7.pw' in url:  #Terminé
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = 'videoLink = \'(.+?)\''
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult:
                sHosterUrl = aResult[0]

        if 'totalsport.me' in url:  #Terminé
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = 'source: "(.+?)"'
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult:
                sHosterUrl = aResult[0]

        if 'sportsbar.pw' in url:  #Terminé
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = 'videoLink = \'(.+?)\''
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult:
                sHosterUrl = aResult[0]

        if 'livesoccers.pw' in url:  #Terminé
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = '<iframe src=\'(.+?)\''
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult:
                sHosterUrl2 = aResult[0]
                UA = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0'
                oRequestHandler = cRequestHandler(sHosterUrl2)
                oRequestHandler.addHeaderEntry('User-Agent', UA)
                oRequestHandler.addHeaderEntry('Referer', sHosterUrl2)
                sHtmlContent3 = oRequestHandler.request()
                #VSlog(sHtmlContent3)
                sPattern3 = '<source src="([^"]+)"'
                aResult1 = re.findall(sPattern3, sHtmlContent3)
                if aResult1:
                    sHosterUrl = aResult1[0]

        if 'assia' in url:  #Terminé
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = 'file:"([^"]+)"'
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult:
                sHosterUrl = aResult[0]

        if 'sportlive.site' in url:  #Terminé
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = '<iframe src="(.+?)"'
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult:
                sHosterUrl2 = aResult[0]
                #VSlog(str(sHosterUrl2))
                oRequestHandler = cRequestHandler(sHosterUrl2)
                sHtmlContent3 = oRequestHandler.request()
                sPattern3 = '<script type=\'text/javascript\'>id=\'(.+?)\''
                aResult2 = re.findall(sPattern3, sHtmlContent3)
                if aResult2:
                    sHosterUrl3 = aResult2[0]
                    sHosterUrl3 = "http://hdcast.pw/stream_jw2.php?id=" + sHosterUrl3
                    #VSlog(str(sHosterUrl3))
                    oRequestHandler = cRequestHandler(sHosterUrl3)
                    sHtmlContent4 = oRequestHandler.request()
                    sPattern4 = 'curl = "([^"]+)";'
                    aResult3 = re.findall(sPattern4, sHtmlContent4)
                    if aResult3:
                        sHosterUrl = aResult3[0]
                        sHosterUrl = base64.b64decode(sHosterUrl)
                        VSlog(sHosterUrl)

        if 'sport-stream365' in url:  #Terminé
            sPattern2 = '<td bgcolor=".+?" *align="center".+?\s*<iframe.+?src="http://sport-stream365.com.+?/?game=([^"]+)&ta.+?".+?</iframe>'
            aResult = re.findall(sPattern2, sHtmlContent)
            if aResult:
                gameId = aResult[0]
                sHosterUrl = 'http://91.192.80.210/edge0/xrecord/' + gameId + '/prog_index.m3u8'

        if 'youtube' in url:  #Je sais pas
            sPattern2 = 'youtube.com/embed/(.+?)[?]autoplay=1'
            aResult = re.findall(sPattern2, url)

            if aResult:
                video_id = aResult[0]
                VSlog(video_id)

            url = url.replace('/embed/', '/watch?v=')
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()

            sPattern2 = '\W[\'"]?t[\'"]?: ?[\'"](.+?)[\'"]'
            aResult = re.findall(sPattern2, sHtmlContent2)

            if aResult:
                token = aResult[0]
                #VSlog(token)

            params = {
                'video_id': video_id,
                'el': '$el',
                'ps': 'default',
                'eurl': 'https://youtube.googleapis.com/v/' + video_id,
                'hl': 'fr_FR',
                't': urllib2.quote(token)
            }

            url2 = 'https://youtube.com/get_video_info?video_id=' + video_id  #+ urllib.parse.urlencode(params)

            req = urllib2.Request(url2)

            response = urllib2.urlopen(req)
            sHtmlContent3 = response.read().decode('utf-8')
            #VSlog(sHtmlContent3)

            sPattern3 = '&hlsvp=(.+?).m3u8.+?'
            aResult = re.findall(sPattern3, sHtmlContent3)

            if aResult:
                sHosterUrl = urllib2.unquote(aResult[0])
                sHosterUrl = urllib2.unquote(sHosterUrl)
                sHosterUrl = sHosterUrl + '.m3u8'
                #VSlog(sHosterUrl)

        if 'streamup.me' in url:  #Terminé
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = '<iframe src="([^"]+)"'
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult:
                sHosterUrl2 = aResult[0]
                VSlog(sHosterUrl2)
                oRequestHandler = cRequestHandler(sHosterUrl2)
                sHtmlContent3 = oRequestHandler.request()
                sHtmlContent3 = urllib.unquote(sHtmlContent3)
                VSlog(sHtmlContent3)
                sPattern3 = 'src: "\/\/(.+?)"'
                aResult = re.findall(sPattern3, sHtmlContent3)
                if aResult:
                    sHosterUrl = 'http://' + aResult[0]

        if 'livestream' in url:  #Je sais pas ne démarre pas de temps en temps
            sPattern2 = '<td bgcolor=".+?" *align="center".+?\s*<iframe.+?src="https://([^"]+)/player?.+?</iframe>'
            aResult = re.findall(sPattern2, sHtmlContent)
            if aResult:
                accountId = aResult[0]
            jsonUrl = 'https://player-api.new.' + accountId + '?format=short'

            oRequestHandler = cRequestHandler(jsonUrl)
            sHtmlContent = oRequestHandler.request()

            sPattern3 = '"m3u8_url":"(.+?)"'
            aResult = re.findall(sPattern3, sHtmlContent)
            if aResult:
                sHosterUrl = aResult[0]

        if 'forbet.tv' in url:  #Probleme ssl
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = 'file: "([^"]+)"'
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult:
                sHosterUrl = aResult[0]

        if 'p.hd24.watch' in url:  #Terminé
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = 'data-channel="([^"]+)">'
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult:
                Host = '190-2-146-56.livesports24.online'
                sHosterUrl = 'https://' + Host + '/' + aResult[0] + '.m3u8'

        if 'hdsoccerstreams.net' in url:  #Pas terminer
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = '<script>fid="(.+?)"'
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult:
                fid = aResult[0]
                VSlog(fid)

            UA = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0'
            url2 = 'http://webtv.ws/embed.php?live=spstream' + fid + '&vw=700&vh=440'
            Referer = url
            oRequestHandler = cRequestHandler(url2)
            oRequestHandler.addHeaderEntry('User-Agent', UA)
            oRequestHandler.addHeaderEntry('Referer', Referer)
            sHtmlContent3 = oRequestHandler.request()
            #VSlog(sHtmlContent3)

        if 'thesports4u.net' in url:  #Pas terminer leurs hosters est down (erreur 404)
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = '<script>fid="(.+?)"'
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult:
                fid = aResult[0]
                VSlog(fid)

            UA = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0'
            url2 = 'http://wlive.tv/embed.php?player=desktop&live=' + fid + '&vw=700&vh=440'
            oRequestHandler = cRequestHandler(url2)
            oRequestHandler.addHeaderEntry('User-Agent', UA)
            oRequestHandler.addHeaderEntry('Referer', url2)
            sHtmlContent3 = oRequestHandler.request()
            VSlog(sHtmlContent3)

        if 'sports-stream.net' in url:  #Terminé
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = 'sports-stream.+?ch=(.+?)"'
            aResult = re.findall(sPattern2, sHtmlContent2)

            if aResult:
                fid = aResult[0]

            UA = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0'
            url2 = 'http://webtv.ws/embeds.php?live=spstream' + fid + '&vw=700&vh=440'
            oRequestHandler = cRequestHandler(url2)
            oRequestHandler.addHeaderEntry('User-Agent', UA)
            oRequestHandler.addHeaderEntry(
                'Referer',
                'http://www.sports-stream.net/chtv/sps.php?ch=' + fid)
            sHtmlContent2 = oRequestHandler.request()

            sPattern3 = 'source src="(.+?)".+?">'
            aResult = re.findall(sPattern3, sHtmlContent2)
            if aResult:
                sHosterUrl = aResult[0]

        if 'foot.futbol' in url:  #Terminé
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = '<iframe src=\'(.+?)\''
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult:
                sHosterUrl2 = aResult[0]
                VSlog(sHosterUrl2)
                Referer = sHosterUrl2
                UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'
                oRequestHandler = cRequestHandler(sHosterUrl2)
                oRequestHandler.addHeaderEntry('User-Agent', UA)
                oRequestHandler.addHeaderEntry('Referer', Referer)
                sHtmlContent3 = oRequestHandler.request()
                VSlog(sHtmlContent3)
                sPattern3 = '<source src="([^"]+)"'
                aResult2 = re.findall(sPattern3, sHtmlContent3)
                if aResult2:
                    sHosterUrl = aResult2[0]

        if 'viewhd.me' in url:  #Pas terminer je sais pas comment on trouve le m3u dans hdstream
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = '<script>fid="([^"]+)"'
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult:
                sHosterUrl2 = 'http://www.hdstream.live/embed.php?player=desktop&live=' + aResult[
                    0] + '&vw=620&vh=490'
                VSlog(sHosterUrl2)
                Referer = sHosterUrl2
                UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'
                oRequestHandler = cRequestHandler(sHosterUrl2)
                oRequestHandler.addHeaderEntry('User-Agent', UA)
                oRequestHandler.addHeaderEntry('Referer', Referer)
                sHtmlContent3 = oRequestHandler.request()
                VSlog(sHtmlContent3)

        #if 'socolive.net' in url:#Probleme avec ea et autre (tout changé lol)
        #oRequestHandler = cRequestHandler(url)
        #sHtmlContent2 = oRequestHandler.request()
        #sPattern2 = 'channel=\'(.+?)\', g=\'(.+?)\''
        #aResult = re.findall(sPattern2, sHtmlContent2)
        #VSlog(aResult)

        #if aResult:
        #for aEntry in aResult:
        #channel = aEntry[0]
        #g = aEntry[1]
        #VSlog(channel)
        #VSlog(g)

        #UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'
        #url2 = 'https://www.ucasterplayer.com/hembedplayer/'+ channel +'/'+ g +'/700/480'
        #VSlog(url2)
        #oRequestHandler = cRequestHandler(url2)
        #oRequestHandler.addHeaderEntry('User-Agent',UA)
        #oRequestHandler.addHeaderEntry('Referer','http://socolive.net/ch=.+?')
        #sHtmlContent2 = oRequestHandler.request()
        #VSlog(sHtmlContent2)

        #sPattern3 = '"src", "https://" \+ ea \+ "([^"]+)"'
        #sPattern4 = 'ea = "([^"]+)"'
        #aResult2 = re.findall(sPattern4, sHtmlContent2)
        #aResult1 = re.findall(sPattern3, sHtmlContent2)
        #if aResult2:
        #urldomaine = aResult2[0]
        #VSlog(urldomaine)
        #if aResult1:
        #oRequestHandler.addHeaderEntry('User-Agent',UA)
        #Referer = url2
        #UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'
        #sHosterUrl = 'http://'+ 'p15.quest123.top' + aResult1[0] + '|User-Agent=' + UA + '&referer=' + Referer
        #VSlog(sHosterUrl)

        if '1me.club' in url:  #Terminé
            oRequestHandler = cRequestHandler(url)
            sHtmlContent2 = oRequestHandler.request()
            sPattern2 = '<iframe src="(.+?)"'
            aResult = re.findall(sPattern2, sHtmlContent2)
            if aResult[0]:

                if 'whostreams.net' in aResult[0]:  #Terminé
                    Referer = 'http://1me.club'
                    UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'
                    VSlog(aResult[0])
                    oRequestHandler = cRequestHandler(aResult[0])
                    oRequestHandler.addHeaderEntry('User-Agent', UA)
                    oRequestHandler.addHeaderEntry('Referer', Referer)
                    sHtmlContent3 = oRequestHandler.request()

                    sPattern2 = '(\s*eval\s*\(\s*function(?:.|\s)+?{}\)\))'
                    aResult = re.findall(sPattern2, sHtmlContent3)

                    if aResult:
                        str2 = aResult[0]
                    if not str2.endswith(';'):
                        str2 = str2 + ';'

                    str = cPacker().unpack(str2)
                    VSlog(str)
                    sPattern3 = '{source:"([^"]+)"'
                    aResult1 = re.findall(sPattern3, str)
                    if aResult1:
                        sHosterUrl = aResult1[0]

                if 'widestream.io' in aResult[0]:  #Terminé
                    oRequestHandler = cRequestHandler(aResult[0])
                    sHtmlContent3 = oRequestHandler.request()
                    sPattern3 = 'file:"([^"]+)"'
                    aResult1 = re.findall(sPattern3, sHtmlContent3)
                    if aResult1:
                        sHosterUrl = aResult1[0]

        #VSlog(sHosterUrl)
        xbmc.Player().play(sHosterUrl)
        return