Changeset 37132


Ignore:
Timestamp:
02/13/16 21:35:01 (6 years ago)
Author:
obi
Message:

fix streamlive

File:
1 edited

Legend:

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

    r36961 r37132  
    4141
    4242//<script type="text/javascript" src="http://www.streamlive.to/embed/69654&width=650&height=480&autoplay=true"></script>
    43         tmpstr = gethttps(url1, NULL, NULL, NULL, NULL, NULL, 1);
    44         host = string_resub("http://", "/", url1, 0);
    45         path = string_replace_all(host, "", url1, 0);
     43//      tmpstr = gethttps(url1, NULL, NULL, NULL, NULL, NULL, 1);
     44//      host = string_resub("http://", "/", url1, 0);
     45//      path = string_replace_all(host, "", url1, 0);
     46
     47        tmpstr = gethttps(link, NULL, NULL, NULL, NULL, NULL, 1);
     48        host = string_resub("http://", "/", link, 0);
     49        path = string_replace_all(host, "", link, 0);
     50
    4651        path = string_replace_all("http://", "", path, 1);
    4752        path = string_replace_all(" ", "%20", path, 1);
    4853        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/tvtoast4_tmpstr", oitoa(incount), host, path, tmpstr);
     54
     55        if(ostrstr(tmpstr, "<h1>To prove that you are not bot, please answer the question to continue</h1>") != NULL)
     56        {
     57//              Question: Type this word in the box: walking dead<br /><br />
     58//              Question: Type the following word in the box: lovelivetv<br /><br />
     59//              Question: Type this Honda car SUV in the box: crvhonda<br
     60                printf("tmpstr: %s\n", tmpstr);
     61
     62                char* data = oregex(".*Question:.*: (.*)<br /><br />.*", tmpstr);
     63
     64                data = ostrcat("captcha=", data, 0, 1);
     65                printf("data: %s\n", data);
     66
     67                free(tmpstr), tmpstr = NULL;
     68                tmpstr = gethttps(link, NULL, data, NULL, NULL, link, 1);
     69                free(data), data = NULL;
     70
     71                host = string_resub("http://", "/", link, 0);
     72                path = string_replace_all(host, "", link, 0);
     73                path = string_replace_all("http://", "", path, 1);
     74                path = string_replace_all(" ", "%20", path, 1);
     75                titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/tvtoast4a_tmpstr", oitoa(incount), host, path, tmpstr);
     76        }
    4977
    5078        if(ostrstr(tmpstr, "'file': 'http") != NULL)
     
    5280                streamurl1 = string_resub("'file': 'http", "'", tmpstr, 0);
    5381                streamurl1 = ostrcat("http", streamurl1, 0, 1);
     82                printf("1streamurl1: %s\n", streamurl1);
    5483        }
    5584
     
    73102                streamurl1 = string_resub("'file': 'http", "'", tmpstr, 0);
    74103                streamurl1 = ostrcat("http", streamurl1, 0, 1);
     104                printf("2streamurl1: %s\n", streamurl1);
    75105        }
    76106
     
    86116       
    87117                swfurl = string_resub("type: 'flash', src: '", "'", tmpstr, 0);
    88                 swfurl = string_replace_all("//", "http://", swfurl, 1);
     118//              swfurl = string_replace_all("//", "http://", swfurl, 1);
    89119                debug(99, "tvtoast5_tmpstr%d swfurl=%s", incount, swfurl)
    90120       
     
    98128//$.getJSON("//www.streamlive.to/server.php?id=1447602284", function(json){
    99129                url3 = string_resub("getJSON(\"", "\"", tmpstr, 0);
    100                 url3 = string_replace_all("//", "http://", url3, 1);
     130//              url3 = string_replace_all("//", "http://", url3, 1);
    101131                free(tmpstr), tmpstr = NULL;
    102132       
Note: See TracChangeset for help on using the changeset viewer.