Changeset 36208


Ignore:
Timestamp:
11/17/15 04:17:39 (7 years ago)
Author:
obi
Message:

update nbastream

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/tithek/nbastream.h

    r36176 r36208  
    99        char* host = NULL;
    1010        char* path = NULL;
    11         char* url = NULL;
     11        char* url1 = NULL;
     12        char* url2 = NULL;
     13        char* url3 = NULL;
     14        char* url4 = NULL;
     15        char* url5 = NULL;
    1216        char* id = NULL;
    1317        char* width = NULL;
     
    2933
    3034
    31         url = string_resub("<iframe  src=\"", "\"", tmpstr, 0);
    32         url = ostrcat("http://nbastream.net/", url, 0, 1);
     35        url1 = string_resub("<iframe  src=\"", "\"", tmpstr, 0);
     36        url1 = ostrcat("http://nbastream.net/", url1, 0, 1);
     37
    3338/*
    3439        http://nbastream.net/streams/nbanhl8.html
     
    3641*/
    3742        free(tmpstr), tmpstr = NULL;
    38         tmpstr = gethttps(url, NULL, NULL, NULL, NULL, NULL, 1);
    39         free(host), host = NULL;
    40         free(path), path = NULL;
    41         host = string_resub("http://", "/", url, 0);
    42         path = string_replace_all(host, "", url, 0);
     43        tmpstr = gethttps(url1, NULL, NULL, NULL, NULL, NULL, 1);
     44        free(host), host = NULL;
     45        free(path), path = NULL;
     46        host = string_resub("http://", "/", url1, 0);
     47        path = string_replace_all(host, "", url1, 0);
    4348        path = string_replace_all("http://", "", path, 1);
    4449        path = string_replace_all(" ", "%20", path, 1);
    4550        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/nbastream2_tmpstr", NULL, host, path, tmpstr);
    4651
    47         free(url), url = NULL;
    48         url = string_resub("src='", "'", tmpstr, 0);
     52        url2 = string_resub("src='", "'", tmpstr, 0);
    4953        id = string_resub("id='", "'", tmpstr, 0);
    5054        width = string_resub("id='", "'", tmpstr, 0);
    5155        height = string_resub("id='", "'", tmpstr, 0);
    5256
     57///////////////
     58        char* url7 = ostrcat("http://www.google-analytics.com/analytics.js", NULL, 0, 0);
     59        free(tmpstr), tmpstr = NULL;
     60        tmpstr = gethttps(url7, NULL, NULL, NULL, NULL, link, 1);
     61        free(host), host = NULL;
     62        free(path), path = NULL;
     63        host = string_resub("http://", "/", url7, 0);
     64        path = string_replace_all(host, "", url7, 0);
     65        path = string_replace_all("http://", "", path, 1);
     66        path = string_replace_all(" ", "%20", path, 1);
     67        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/nbastream2a_tmpstr", NULL, host, path, tmpstr);
     68///////////////
     69
    5370/*
    5471        http://js.p2pcast.tv/p2pcast/player.js
    5572        document.write('<iframe allowfullscreen width="'+width+'" height="'+height+'" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="true" src="http://p2pcast.tv/stream.php?id='+id+'&live='+live+'&p2p='+p2p+'&stretching='+stretching+'"></iframe>');
    5673*/
    57         free(tmpstr), tmpstr = NULL;
    58         tmpstr = gethttps(url, NULL, NULL, NULL, NULL, NULL, 1);
    59         free(host), host = NULL;
    60         free(path), path = NULL;
    61         host = string_resub("http://", "/", url, 0);
    62         path = string_replace_all(host, "", url, 0);
     74
     75        free(tmpstr), tmpstr = NULL;
     76        tmpstr = gethttps(url2, NULL, NULL, NULL, NULL, url1, 1);
     77        free(host), host = NULL;
     78        free(path), path = NULL;
     79        host = string_resub("http://", "/", url2, 0);
     80        path = string_replace_all(host, "", url2, 0);
    6381        path = string_replace_all("http://", "", path, 1);
    6482        path = string_replace_all(" ", "%20", path, 1);
    6583        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/nbastream3_tmpstr", NULL, host, path, tmpstr);
     84
     85
     86        char* url8 = ostrcat("http://ax2.adit-media.com/asw/fm.js?c=1033&a=0&f=&n=2019&r=141&d=9&adm=&q=&$=&s=901&ct=&z=0.4985966447275132&tt=0&tz=1&pu=http%3A%2F%2Fnbastream.net%2Fstreams%2Fnbanhl2.html&ru=http%3A%2F%2Fnbastream.net%2Forlando-magic-at-washington-wizards-live-stream.html&pi=1447548879638&ce=UTF-8&zpu=nbastream.net_nbastream.net__0_2&tpu=0", NULL, 0, 0);
     87        free(tmpstr), tmpstr = NULL;
     88        tmpstr = gethttps(url8, NULL, NULL, NULL, NULL, url1, 1);
     89        free(host), host = NULL;
     90        free(path), path = NULL;
     91        host = string_resub("http://", "/", url7, 0);
     92        path = string_replace_all(host, "", url7, 0);
     93        path = string_replace_all("http://", "", path, 1);
     94        path = string_replace_all(" ", "%20", path, 1);
     95        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/nbastream3a_tmpstr", NULL, host, path, tmpstr);
    6696
    6797/*
     
    70100        <script src="http://js.p2pcast.tv/p2pcast/pplayer.10.js"></script>
    71101*/
    72         free(url), url = NULL;
    73         url = string_resub("src=\"", "\"", tmpstr, 0);
    74         url = string_replace_all("'+id+'", id, url, 1);
    75         url = string_replace_all("'+live+'", "0", url, 1);
    76         url = string_replace_all("'+p2p+'", "0", url, 1);
    77         url = string_replace_all("'+stretching+'", "uniform", url, 1);
    78         free(tmpstr), tmpstr = NULL;
    79         tmpstr = gethttps(url, NULL, NULL, NULL, NULL, NULL, 1);
    80         free(host), host = NULL;
    81         free(path), path = NULL;
    82         host = string_resub("http://", "/", url, 0);
    83         path = string_replace_all(host, "", url, 0);
     102/*
     103
     104        url3 = string_resub("src=\"", "\"", tmpstr, 0);
     105        url3 = string_replace_all("'+id+'", id, url3, 1);
     106        url3 = string_replace_all("'+live+'", "0", url3, 1);
     107        url3 = string_replace_all("'+p2p+'", "0", url3, 1);
     108        url3 = string_replace_all("'+stretching+'", "uniform", url3, 1);
     109*/
     110        url3 = ostrcat("http://p2pcast.tv/stream.php?id=", id, 0, 0);
     111        url3 = ostrcat(url3, "&live=0&p2p=0&stretching=uniform", 1, 0);
     112
     113        free(tmpstr), tmpstr = NULL;
     114        tmpstr = gethttps(url3, NULL, NULL, NULL, NULL, url1, 1);
     115        free(host), host = NULL;
     116        free(path), path = NULL;
     117        host = string_resub("http://", "/", url3, 0);
     118        path = string_replace_all(host, "", url3, 0);
    84119        path = string_replace_all("http://", "", path, 1);
    85120        path = string_replace_all(" ", "%20", path, 1);
     
    107142//aHR0cDovL2xpdmUucDJwY2FzdC50djo4MDEwL3R2Mi81MDQ5MTcubTN1OD9zZj1OVFl5TW1SbFpXTmpaVEV5TlE9PSZ0b2tlbj0=
    108143//decode base64 = http://live.p2pcast.tv:8010/tv2/504917.m3u8?sf=NTYyMmRlZWNjZTEyNQ==&token=
    109 
    110 
     144/////////////////////
     145/*
     146//      http://js.p2pcast.tv/p2pcast/live.htm?channel=504715
     147        url4 = ostrcat("http://js.p2pcast.tv/p2pcast/live.htm?channel=", id, 0, 0);
     148        free(tmpstr), tmpstr = NULL;
     149        tmpstr = gethttps(url4, NULL, NULL, NULL, NULL, url3, 1);
     150        free(host), host = NULL;
     151        free(path), path = NULL;
     152        host = string_resub("http://", "/", url4, 0);
     153        path = string_replace_all(host, "", url4, 0);
     154        path = string_replace_all("http://", "", path, 1);
     155        path = string_replace_all(" ", "%20", path, 1);
     156        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/nbastream5_tmpstr", NULL, host, path, tmpstr);
     157*/
    111158//      url = oregex(".*<script src=\"(http://.*)\"></script>.*", tmpstr);
    112         free(tmpstr), tmpstr = NULL;
    113         tmpstr = gethttps("http://p2pcast.tv/getToken.php", NULL, NULL, NULL, NULL, url, 1);
    114         free(host), host = NULL;
    115         free(path), path = NULL;
    116         host = string_resub("http://", "/", url, 0);
    117         path = string_replace_all(host, "", url, 0);
    118         path = string_replace_all("http://", "", path, 1);
    119         path = string_replace_all(" ", "%20", path, 1);
    120         titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/nbastream5_tmpstr", NULL, host, path, tmpstr);
     159        url5 = ostrcat("http://p2pcast.tv/getToken.php", NULL, 0, 0);
     160        free(tmpstr), tmpstr = NULL;
     161        tmpstr = gethttps(url5, NULL, NULL, NULL, NULL, url3, 1);
     162        free(host), host = NULL;
     163        free(path), path = NULL;
     164        host = string_resub("http://", "/", url5, 0);
     165        path = string_replace_all(host, "", url5, 0);
     166        path = string_replace_all("http://", "", path, 1);
     167        path = string_replace_all(" ", "%20", path, 1);
     168        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/nbastream6_tmpstr", NULL, host, path, tmpstr);
    121169
    122170//      {"token":"I-OAZrLqbye4LgcL6nhHkQ"}
     
    126174        streamurl = ostrcat(curlstring, NULL, 0, 0);
    127175        streamurl = ostrcat(streamurl, token, 1, 0);
     176
     177        free(tmpstr), tmpstr = NULL;
     178        tmpstr = gethttps(streamurl, NULL, NULL, NULL, NULL, "http://cdn.p2pcast.tv/jwplayer.flash.swf", 1);
     179        free(host), host = NULL;
     180        free(path), path = NULL;
     181        host = string_resub("http://", "/", streamurl, 0);
     182        path = string_replace_all(host, "", streamurl, 0);
     183        path = string_replace_all("http://", "", path, 1);
     184        path = string_replace_all(" ", "%20", path, 1);
     185        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/nbastream7_tmpstr", NULL, host, path, tmpstr);
     186
     187
     188        if(streamurl != NULL)
     189                streamurl = ostrcat(streamurl, "|User-Agent=libcurl-agent/1.0|Referer=http://cdn.p2pcast.tv/jwplayer.flash.swf", 1, 0);
     190
    128191end:
    129192
     
    132195        free(host), host = NULL;
    133196        free(path), path = NULL;
    134         free(url), url = NULL;
     197        free(url1), url1 = NULL;
     198        free(url2), url2 = NULL;
     199        free(url3), url3 = NULL;
     200        free(url4), url4 = NULL;
     201        free(url5), url5 = NULL;
    135202        free(id), id = NULL;
    136203        free(width), width = NULL;
Note: See TracChangeset for help on using the changeset viewer.