Kodi-vStream / venom-xbmc-addons

Addon de Streaming français pour Xbmc
GNU General Public License v3.0
497 stars 275 forks source link

Une question pour ajouter une source #2212

Closed Ovni-crea closed 6 years ago

Ovni-crea commented 6 years ago

Bon l'idée c'est que je veux ajouter la source livetv pour le sport le problème c'est avant de commencer le fichier python je voudrais savoir si Kodi gère les lecteurs flash Merci

Ovni-crea commented 6 years ago

Le problème c'est aResult1 et 2 c'est tout je veux afficher le calendrier comme sur le site

TmpName commented 6 years ago

Ben pour l'annee une page en plus qui affiche que les années, pas le choix Pour les journee, il te faut utiliser 1 seul regex qui prend la journee ET le contenu de la meme maniere que https://github.com/Kodi-vStream/venom-xbmc-addons/blob/Beta/plugin.video.vstream/resources/sites/mangacity_org.py pour la langue, ligne 463/464, le regex est ligne 442 , regex = regex1|regex2 De cette maniere tout est dans l'ordre. Sinon faire 2 regex commme dans https://github.com/Kodi-vStream/venom-xbmc-addons/blob/Beta/plugin.video.vstream/resources/sites/serie_streaminghd.py pour VF VO.

TmpName commented 6 years ago

Ou alors tu fait un regex qui decoupe toutes les journee par bloc (journee1 / journee2 / journnee 3) Et dans la boucle ou tu traites les bloc tu reparses par journee (le bloc au lieu de htmlcontent) , les details, la y a des exemples aussi, mais j'ai pas trouve.

mbebe commented 6 years ago

Bon j'ai avancé mais je suis perdu a partir du code source HTML de leurs hébergeur

<span style='display:none' id=cnierfutegihkSasBt>GjvHms7Sd-hb6kK_2FIYv=Pkx6tDi-Q_GBu7aUhsyhJ1=OWk</span><span style='display:none' id=heBautetksgSficrni>7kBvUhkdyKQGsF6Sx-i=_=hj_uHv6bkDthmIP1Y2W-OsJGa7</span><span style='display:none' id=ctSfetauksgnhBiire>Sv-xQHK-taF6I7YG1sU==DP6_kudhmhsGBv2iyWbOkhJ_k7j</span><span style='display:none' id=tkihcnsuiaeBSgrfte>FStIW=_GsyhYj2PaxDv7Hk-61BhiJdGuk=kbUh-Os7K_Qv6m</span><span style='display:none' id=eSfiruBstktghicnea>1J7KkDsxWPikk2_I=6vhuFms-Y6h-O=7vtjBGS_aHydQUbhG</span><span style='display:none' id=ihfksgateitrnSeuBc>v6-vS_6UiksBP1kDQ2KhI-djhhJysa_7tmFGkH=xOuY=b7WG</span><span style='display:none' id=serfStnkighBtiacue>HUkDJbyjkFk=QsK=W_77haOd_itYxSm26P6uI-BGhh-1vvGs</span><span style='display:none' id=treeigctksSainfuhB>WIUx=S=s7hFmi7k2uPabKGGkYkBd6_hvDh_vjs-Q6Oty1H-J</span><span style='display:none' id=fcShieketugrisBtan>O1sh_xkvuU-ksmkjbt7K=BY6-6GdHiGPD2h7yW_hFIJvaSQ=</span><span style='display:none' id=rgSienkficteasuBht>mS7IivskKkt=JHDGv1yk_FPGBQUYh-=h_6-jOab2xW67usdh</span><span style='display:none' id=uiestehfkngcSrtBia>G662Hk1BhvI_-WF-iSskuyhkm=jGx=dPJvY7OQUthbasK_7D</span><span style='display:none' id=fiegrcatSnBeitsuhk>-FsW6mK2D6=U1y7GGk=athHvvB-jh__7ISbOdQiYPuxJkksh</span><span style='display:none' id=iSgftaueBcsahrntki>ash=xmSDGJvdbhWjh7uY6POUBvi_7kFk1_6y-G2IHsQtK-k=</span><span style='display:none' id=SragikfecusehtBnti>IbSJxUdkDkh_hKQ1iyms7_v6=uBt=YOPaFs2kG-jW7G-h6vH</span><span style='display:none' id=cratgfhensekitiuBS>sO66Qub=GPkDsW_KGYv7d7=-mF_kkhB-tUJISiyx1jhvhHa2</span><span style='display:none' id=iSgenttekBairhfusc>OtGD_khadU=KSs7kkxjmsG67i6QF-_W2Yhy=bv-IuhBJ1HvP</span><span style='display:none' id=uctaeBhreisSntikgf>FkUGbHQ7h1-vstSivPOahdk-s2Wyhj6D_KkI=6BG_7mx=uYJ</span><span style='display:none' id=tSunfBrceihektgasi>6Qj_-BhbaU7hu=_-O7WhHtPYxFkDs2=ivskvdGKIm6S1GkJy</span><span style='display:none' id=hicgtBskeeaSitnfur>h=_vv7WshkYkKQ-6ixDOub6mUt=dkhBHI7_yFSPGasj2-GJ1</span><span style='display:none' id=geutticesnfhaiSrkB>7OhGjDsv1Qu6kx2aGi_bh=67sWFyKhYBJvmk-_H=S-ItdUPk</span><span style='display:none' id=csiuhttBgSeirekfna>Yhx-O6Ju7avk_vFkHWS2I=-jG7Gym=PDssK6Bi1dhUkbtQh_</span><span style='display:none' id=sStitieaBhufkgecnr>Pvxkkh=j7u6Q-=7sKh-ih_HByOUS6sYvtkGFbmDJIW2G_ad1</span><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/clappr@latest/dist/clappr.min.js"></script>
                                            <script type="text/javascript" src="https://cdn.jsdelivr.net/clappr.level-selector/latest/level-selector.min.js"></script>
                                            <div id="hdplayer"></div>
                                            <script type="text/javascript">
                                            var aelurarsntiyebgrAeSUr = ["sh","360","e=1","end","e=0","hls","tim","sst","536","942","&hl","art","tim","&hl"];
                                            var rrgrrSliUeynteubesaaA = ["sh","tim","360","e=1","&hl","sst","art","536","e=0","end","hls","tim","942","&hl"];
                                            var eritrUAarsagySlnbreue = ["end","sst","e=0","e=1","360","942","hls","art","&hl","tim","sh","tim","&hl","536"];
                                            var eiarSgebulseatnryrArU = ["&hl","sh","tim","360","tim","end","942","hls","sst","536","&hl","e=0","art","e=1"];
                                            var yAUtbSaleenasrrirerug = ["942","tim","end","536","sst","&hl","e=1","tim","&hl","hls","sh","360","e=0","art"];
                                            var inbeUruraleAyegrsrtaS = ["&hl","942","art","end","sst","tim","&hl","tim","hls","e=1","sh","e=0","536","360"];
                                            var lbytnUrSisAaraueegrre = ["end","hls","942","&hl","tim","art","sh","536","tim","&hl","sst","e=0","360","e=1"];
                                            var sarieglbayterrUeAnurS = ["hls","sh","e=1","art","tim","tim","536","e=0","&hl","sst","end","360","&hl","942"];
                                            var rnSretbysueaUgarireAl = ["&hl","e=0","sh","&hl","sst","942","e=1","tim","art","360","tim","end","hls","536"];
                                            var nlrarraySseUeitreubgA = ["sh","hls","tim","&hl","tim","942","e=1","536","e=0","sst","&hl","art","end","360"];
                                            var eraynrtrrAlgSeabeusiU = ["536","sh","942","hls","tim","&hl","art","e=0","e=1","tim","end","360","sst","&hl"];
                                            var neuUSgriaryblrtresAea = ["&hl","e=1","sh","tim","e=0","hls","art","tim","sst","536","end","360","&hl","942"];
                                            var lsaSutriarrngArybUeae = ["hls","end","tim","e=1","536","942","360","&hl","sst","art","tim","e=0","&hl","sh"];
                                            var syStrgbienreuaAlUerra = ["e=0","e=1","536","&hl","sh","art","sst","tim","end","360","tim","hls","942","&hl"];
                                            var grUylareeabuntrierSAs = ["&hl","tim","942","&hl","hls","art","e=1","sh","sst","tim","e=0","536","360","end"];
                                            var SgietnrrubyeAasUrealr = ["sst","&hl","e=0","sh","536","tim","360","e=1","hls","art","tim","end","&hl","942"];
                                            var UyurenrbtgeSasarleriA = ["e=0","536","e=1","&hl","360","tim","hls","sh","sst","tim","&hl","end","942","art"];
                                            var ryarAtsaurenlbgUierSe = ["536","360","tim","hls","e=1","&hl","942","&hl","end","art","sst","e=0","sh","tim"];
                                            var lrgyUbeeuSeiAarnsratr = ["e=1","&hl","art","tim","360","&hl","hls","536","sh","e=0","tim","end","sst","942"];
                                            var gyrltaAeuUsnSrereibra = ["536","art","e=0","e=1","942","tim","&hl","360","&hl","sst","hls","sh","tim","end"];
                                            var urrnegsaaStUleirbAeyr = ["tim","&hl","tim","sh","942","360","art","&hl","536","hls","end","e=0","e=1","sst"];
                                            var UeireeraASynbulratsrg = ["tim","e=1","360","sh","942","end","536","&hl","sst","tim","hls","&hl","art","e=0"];
                                            var playerElement = document.getElementById("hdplayer");
                                            var player = new Clappr.Player({
                                             height: "440",
                                             width: "700",
                                             mute: 'true',
                                              plugins: {
                                                'core': [LevelSelector]
                                              },
                                             hlsjsConfig: {
                                             xhrSetup: function(xhr, url) {
                                              xhr.withCredentials = false;
                                             }
                                             }
                                            });
                                            player.attachTo(playerElement);
                                            player.load({source: tepUttHgrl(), mimeType: 'application/vnd.apple.mpegurl'});
                                            player.play();

i had this code in wlive.tv there should be something in HTML like this: function gtrUtHplet() { return(["\/","\/","t","v",".","w","l","i","v","e",".","t","v","\/","t","v","\/","B","T","Y","1","W","t","Y","8","L","g","2","0","1","8","0","3","2","1","\/","p","l","a","y","l","i","s","t",".","m","3","u","8","?"].join("") + aAlStusngrereirbraUay.join("") + document.getElementById("trcSBfaangikestuih").innerHTML); }

`

this will return correct url:

pi = re.findall('return\\((.*?)\\);',HTMLcontent)
print pi
pi=pi[0]
if pi:

    join = re.findall('(\\[.*?\\]).join',pi)
    el_id = re.findall('(\\w+).join',pi)
    aa = re.findall('document.getElementById\\("(.*?)"',pi)
    if join:
        join = ''.join(eval(join[0])).replace('\\','')
    print join
    if el_id:
        tmp = re.findall('var %s\\s*=\\s*(\\[.*?\\])'%el_id[0],HTMLcontent)
        el_id = ''.join(eval(tmp[0])) if tmp else ''
    if aa:
        aa = re.findall('%s\\s*>(.*?)<'%aa[0],HTMLcontent)
        aa = aa[0] if aa else ''
        video_url = join + el_id + aa +'|User-Agent='+U'+'&Referer='+url_main
        print video_url

` UA is your user agent, url_main is referer. so try this.

TmpName commented 6 years ago

Il a raison, bon j'ai pas vu le code, mais c'est bien une url vers un m3u8 qui etait cache dans le code qu'il montre.

thx @mbebe

Ovni-crea commented 6 years ago

https://pastebin.com/H8MjwVuc j'ai essayer d'utiliser la méthode série_streaminghd.py pour les regex La 1ere méthode testé mais le problème c'est les matchs qui affiche l'URL donc j'ai préfère d'utiliser cette méthode qui paraît le mieux mais la le fichiers n'est plus détecté est mon logiciel ne détecte pas d'erreur de synthax donc je sais pas ou je me suis planté j'ai rechercher sur Google mais rien si quelqu'un peut me corriger je lui dit merci ^^

TmpName commented 6 years ago

ligen 1057, prb d'indent.