Changeset 36083


Ignore:
Timestamp:
Nov 6, 2015, 12:14:58 AM (5 years ago)
Author:
obi
Message:

fix

Location:
titan/plugins/tithek
Files:
14 edited

Legend:

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

    r35731 r36083  
    229229///////////////////////////
    230230                debug(99, "url: %s", url);
    231                 tmpstr = gethttps(url, NULL, NULL, NULL, NULL, 1);
     231                tmpstr = gethttps(url, NULL, NULL, NULL, NULL, NULL, 1);
    232232///////////////
    233233                pages = string_resub("<span class=\\\"pagnDisabled\\\">", "</span>", tmpstr, 0);       
     
    587587        unlink("/tmp/amazon_tmpstr_get0_logout");
    588588
    589         tmpstr = gethttps("https://www.amazon.de/ap/signin?_encoding=UTF8&openid.assoc_handle=deflex&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&openid.pape.max_auth_age=0&openid.return_to=https%3A%2F%2Fwww.amazon.de%2Fgp%2Fyourstore%2Fhome%3Fie%3DUTF8%26action%3Dsign-out%26path%3D%252Fgp%252Fyourstore%252Fhome%26ref_%3Dnav__gno_signout%26signIn%3D1%26useRedirectOnSuccess%3D1", NULL, NULL, NULL, NULL, 1);
     589        tmpstr = gethttps("https://www.amazon.de/ap/signin?_encoding=UTF8&openid.assoc_handle=deflex&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&openid.pape.max_auth_age=0&openid.return_to=https%3A%2F%2Fwww.amazon.de%2Fgp%2Fyourstore%2Fhome%3Fie%3DUTF8%26action%3Dsign-out%26path%3D%252Fgp%252Fyourstore%252Fhome%26ref_%3Dnav__gno_signout%26signIn%3D1%26useRedirectOnSuccess%3D1", NULL, NULL, NULL, NULL, NULL, 1);
    590590        titheklog(debuglevel, "/tmp/amazon_tmpstr_get0_logout", NULL, NULL, NULL, tmpstr);     
    591591        free(tmpstr), tmpstr = NULL;
     
    613613
    614614//////////////////////////////////////////////////
    615         tmpstr = gethttps(url, NULL, NULL, NULL, NULL, 1);
     615        tmpstr = gethttps(url, NULL, NULL, NULL, NULL, NULL, 1);
    616616        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/amazon_streamurl_get1", NULL, NULL, NULL, tmpstr);     
    617617        free(url), url = NULL;
     
    697697
    698698//////////////////////////////////////////////////     
    699         tmpstr = gethttps(url, NULL, NULL, NULL, NULL, 1);
     699        tmpstr = gethttps(url, NULL, NULL, NULL, NULL, NULL, 1);
    700700        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/amazon_streamurl_get2", NULL, NULL, NULL, tmpstr);     
    701701        free(url), url = NULL;
     
    714714
    715715//////////////////////////////////////////////////     
    716         tmpstr = gethttps(url, NULL, NULL, NULL, NULL, 1);
     716        tmpstr = gethttps(url, NULL, NULL, NULL, NULL, NULL, 1);
    717717        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/amazon_streamurl_get3", NULL, NULL, NULL, tmpstr);     
    718718        free(url), url = NULL;
     
    750750
    751751//////////////////////////////////////////////////     
    752         tmpstr = gethttps(url, NULL, NULL, NULL, NULL, 1);
     752        tmpstr = gethttps(url, NULL, NULL, NULL, NULL, NULL, 1);
    753753        titheklog(debuglevel, "/tmp/amazon_streamurl_get4", NULL, NULL, NULL, tmpstr); 
    754754        free(url), url = NULL;
     
    926926        unlink("/tmp/amazon_tmpstr_get4_blank");
    927927
    928         tmpstr = gethttps("https://www.amazon.de/", NULL, NULL, NULL, NULL, 1);
     928        tmpstr = gethttps("https://www.amazon.de/", NULL, NULL, NULL, NULL, NULL, 1);
    929929//      debug(99, "tmpstr: %s", tmpstr);
    930930        titheklog(debuglevel, "/tmp/amazon_tmpstr_get1_blank", NULL, NULL, NULL, tmpstr);       
     
    950950        if(ret == 0)
    951951        {
    952                 tmpstr = gethttps("https://www.amazon.de/gp/sign-in.html", NULL, NULL, NULL, NULL, 1);
     952                tmpstr = gethttps("https://www.amazon.de/gp/sign-in.html", NULL, NULL, NULL, NULL, NULL, 1);
    953953                titheklog(debuglevel, "/tmp/amazon_tmpstr_get2_sign-in", NULL, NULL, NULL, tmpstr);     
    954954
     
    10321032                hash = ostrcat(hash, pass, 1, 0);
    10331033       
    1034                 tmpstr = gethttps("https://www.amazon.de/ap/signin", NULL, hash, NULL, NULL, 1);
     1034                tmpstr = gethttps("https://www.amazon.de/ap/signin", NULL, hash, NULL, NULL, NULL, 1);
    10351035//              debug(99, "ret=%s", tmpstr);
    10361036                titheklog(debuglevel, "/tmp/amazon_tmpstr_post1", NULL, NULL, NULL, tmpstr);   
    10371037                free(tmpstr), tmpstr = NULL;
    10381038
    1039                 tmpstr = gethttps("https://www.amazon.de/", NULL, NULL, NULL, NULL, 1);
     1039                tmpstr = gethttps("https://www.amazon.de/", NULL, NULL, NULL, NULL, NULL, 1);
    10401040//              debug(99, "tmpstr: %s", tmpstr);
    10411041                titheklog(debuglevel, "/tmp/amazon_tmpstr_get3_blank", NULL, NULL, NULL, tmpstr);       
    10421042                free(tmpstr), tmpstr = NULL;
    10431043
    1044                 tmpstr = gethttps("https://www.amazon.de/", NULL, NULL, NULL, NULL, 1);
     1044                tmpstr = gethttps("https://www.amazon.de/", NULL, NULL, NULL, NULL, NULL, 1);
    10451045//              debug(99, "tmpstr: %s", curlretbuf);
    10461046                titheklog(debuglevel, "/tmp/amazon_tmpstr_get4_blank", NULL, NULL, NULL, tmpstr);       
  • titan/plugins/tithek/cloudzilla.h

    r35609 r36083  
    3232
    3333        debug(99, "url: %s", url);
    34         tmpstr = gethttps(url, NULL, NULL, NULL, NULL, 1);
     34        tmpstr = gethttps(url, NULL, NULL, NULL, NULL, NULL, 1);
    3535        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek//cloudzilla1_get", NULL, NULL, NULL, tmpstr); 
    3636
  • titan/plugins/tithek/filenuke.h

    r36055 r36083  
    4040
    4141        debug(99, "url: %s", tmplink);
    42         tmpstr = gethttps(tmplink, NULL, NULL, NULL, NULL, 1);
     42        tmpstr = gethttps(tmplink, NULL, NULL, NULL, NULL, NULL, 1);
    4343        titheklog(debuglevel, "/tmp/filenuke1_get", NULL, NULL, NULL, tmpstr); 
    4444
     
    5656
    5757        debug(99, "url: %s", tmplink);
    58         tmpstr = gethttps(tmplink, NULL, NULL, NULL, NULL, 1);
     58        tmpstr = gethttps(tmplink, NULL, NULL, NULL, NULL, NULL, 1);
    5959        titheklog(debuglevel, "/tmp/filenuke2_get", NULL, NULL, NULL, tmpstr); 
    6060
  • titan/plugins/tithek/letwatch.h

    r35567 r36083  
    4949
    5050        debug(99, "url: %s", link);
    51         tmpstr = gethttps(url, NULL, NULL, NULL, NULL, 1);
     51        tmpstr = gethttps(url, NULL, NULL, NULL, NULL, NULL, 1);
    5252        titheklog(debuglevel, "/tmp/letwatch1_get", NULL, NULL, NULL, tmpstr); 
    5353
  • titan/plugins/tithek/mightyupload.h

    r35781 r36083  
    4545        char* id = oregex("http://.*/(.*)/.*", link);
    4646        debug(99, "id: %s", id);
    47 
     47        if(id == NULL)
     48        {
     49                id = oregex("http://.*/(.*).html.*", link);
     50                debug(99, "id2: %s", id);
     51        }
     52       
    4853        debug(99, "tmppath: %s", tmppath);
    4954        debug(99, "tmphost: %s", tmphost);
     
    5257        free(id), id = NULL;
    5358
    54         debug(99, "url: %s", link);
    55         tmpstr = gethttps(url, NULL, NULL, NULL, NULL, 1);
     59        debug(99, "url: %s", url);
     60        tmpstr = gethttps(url, NULL, NULL, NULL, NULL, NULL, 1);
    5661        titheklog(debuglevel, "/tmp/mightyupload1_get", NULL, NULL, NULL, tmpstr);     
    5762        tmpstr = jsunpack(tmpstr);
     
    7176        }
    7277
    73         streamlink = string_resub("name=\"src\"value=\"", "\"", tmpstr, 0);
     78        streamlink = string_resub("file: '", "'", tmpstr, 0);
     79        if(streamlink == NULL)
     80                streamlink = string_resub("name=\"src\"value=\"", "\"", tmpstr, 0);
    7481        if(streamlink == NULL)
    7582                streamlink = string_resub("'label' : '360p', 'file' : '", "'", tmpstr, 0);
  • titan/plugins/tithek/nowtv.h

    r35607 r36083  
    2222        char* tmpstr = NULL, *tmpstr1 = NULL, *tmpstr2 = NULL, *tmpstr3 = NULL, *title = NULL, *pic = NULL, *app = NULL;
    2323
    24         tmpstr = gethttps(link, NULL, NULL, NULL, NULL, 1);
     24        tmpstr = gethttps(link, NULL, NULL, NULL, NULL, NULL, 1);
    2525        titheklog(debuglevel, "/tmp/tithek/nowtv_get1", NULL, NULL, NULL, tmpstr);     
    2626       
  • titan/plugins/tithek/thevideo.h

    r35781 r36083  
    5353        url = ostrcat(tmphost, tmppath, 0, 0);
    5454        debug(99, "url: %s", url);
    55         tmpstr = gethttps(url, NULL, NULL, NULL, NULL, 1);
     55        tmpstr = gethttps(url, NULL, NULL, NULL, NULL, NULL, 1);
    5656        titheklog(debuglevel, "/tmp/thevideo1_get", NULL, NULL, NULL, tmpstr); 
    5757
  • titan/plugins/tithek/tithek.c

    r35609 r36083  
    5555#include "mightyupload.h"
    5656#include "cloudzilla.h"
     57#include "vivo.h"
    5758
    5859char pluginname[] = "TiTan Mediathek";
  • titan/plugins/tithek/tithek.h

    r36059 r36083  
    661661                        {
    662662                                if(ssl == 1)
    663                                         gethttps(link, localfile, NULL, NULL, NULL, 0);
     663                                        gethttps(link, localfile, NULL, NULL, NULL, NULL, 0);
    664664                                else if(tithekdownloadcount >= 24) //start max 24 threads
    665665                                        gethttp(ip, path, port, localfile, pw, timeout, NULL, 0);
  • titan/plugins/tithek/tithek_global.h

    r36052 r36083  
    120120// flag = 0 (without header in output)
    121121// flag = 1 (with header in output)
    122 char* gethttps(char* url, char* localfile, char* data, char* user, char* pass, int flag)
     122char* gethttps(char* url, char* localfile, char* data, char* user, char* pass, char* referer, int flag)
    123123{
    124124        debug(99, "url: %s", url);
     
    177177                /* some servers don't like requests that are made without a user-agent field, so we provide one */
    178178                curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
     179//              curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko");
    179180
    180181                // This is occassionally required to stop CURL from verifying the peers certificate.
     
    194195                curl_easy_setopt(curl_handle, CURLOPT_COOKIEJAR, "/mnt/network/cookies");
    195196                curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1L);
    196                 curl_easy_setopt(curl_handle, CURLOPT_AUTOREFERER, 1L);
     197                if(referer == NULL)
     198                        curl_easy_setopt(curl_handle, CURLOPT_AUTOREFERER, 1L);
     199                else
     200                        curl_easy_setopt(curl_handle, CURLOPT_REFERER, referer);
    197201
    198202                /* get it! */
  • titan/plugins/tithek/tithek_header.h

    r36051 r36083  
    33
    44char* jsunpack(char* input);
    5 char* gethttps(char* url, char* localfile, char* data, char* user, char* pass, int flag);
     5char* gethttps(char* url, char* localfile, char* data, char* user, char* pass, char* referer, int flag);
    66int amazon_login();
    77void amazon_init(char* titheklink, char* tithekfile);
  • titan/plugins/tithek/tithek_settings.h

    r35754 r36083  
    6161                changeinput(amazon_pass, "****");
    6262
     63        b3->hidden = YES;
     64        b4->hidden = YES;
     65
    6366        drawscreen(tithek_settings, 0, 0);
    6467        addscreenrc(tithek_settings, listbox);
     
    6871        {
    6972                addscreenrc(tithek_settings, tmp);
    70 
    71                 if(file_exist("/mnt/network/cookies") && listbox->select != NULL && (ostrcmp(listbox->select->name, "amazon_user") == 0 || ostrcmp(listbox->select->name, "amazon_pass") == 0))
    72                         b4->hidden = NO;                       
    73                 else
    74                         b4->hidden = YES;
    75        
    76                 if(listbox->select != NULL && (ostrcmp(listbox->select->name, "amazon_user") == 0 || ostrcmp(listbox->select->name, "amazon_pass") == 0))
    77                         b3->hidden = NO;
    78                 else
    79                         b3->hidden = YES;
    80 
    81                 drawscreen(tithek_settings, 0, 0);
    8273                rcret = waitrc(tithek_settings, 0, 0);
    8374                tmp = listbox->select;
     
    127118                        unlink("/mnt/network/cookies");
    128119                }
     120
     121                if(file_exist("/mnt/network/cookies") && (ostrcmp(listbox->select->name, "amazon_user") == 0 || ostrcmp(listbox->select->name, "amazon_pass") == 0))
     122                        b4->hidden = NO;                       
     123                else
     124                        b4->hidden = YES;
     125       
     126                if(ostrcmp(listbox->select->name, "amazon_user") == 0 || ostrcmp(listbox->select->name, "amazon_pass") == 0)
     127                        b3->hidden = NO;
     128                else
     129                        b3->hidden = YES;
     130
     131                drawscreen(tithek_settings, 0, 0);
    129132        }
    130133
  • titan/plugins/tithek/vivo.h

    r36051 r36083  
    3131
    3232        debug(99, "link: %s", tmplink);
    33         tmpstr = gethttps(tmplink, NULL, NULL, NULL, NULL, 1);
     33        tmpstr = gethttps(tmplink, NULL, NULL, NULL, NULL, NULL, 1);
    3434        titheklog(debuglevel, "/tmp/vivo1_get", NULL, NULL, NULL, tmpstr);     
    3535
     
    5454        debug(99, "post: %s", post);
    5555
    56         tmpstr = gethttps(tmplink, NULL, post, NULL, NULL, 1);
     56        tmpstr = gethttps(tmplink, NULL, post, NULL, NULL, NULL, 1);
    5757        titheklog(debuglevel, "/tmp/vivo2_post", NULL, NULL, NULL, tmpstr);     
    5858
     
    7171        streamlink = string_resub("data-url=\"", "\"", tmpstr, 0);
    7272
    73         tmpstr = gethttps(tmplink, NULL, NULL, NULL, NULL, 1);
     73        tmpstr = gethttps(tmplink, NULL, NULL, NULL, NULL, NULL, 1);
    7474        titheklog(debuglevel, "/tmp/vivo3_get", NULL, NULL, NULL, tmpstr);     
    7575
  • titan/plugins/tithek/youtube.h

    r36019 r36083  
    2222{
    2323        debug(99, "link: %s", link);
    24         char* ip = NULL, *pos = NULL, *path = NULL, *tmppath = NULL, *streamurl = NULL, *title = NULL, *tmpstr = NULL, *murl = NULL, *sig = NULL, *pic = NULL, *tmplink = NULL;
     24        char* ip = NULL, *pos = NULL, *path = NULL, *tmppath = NULL, *streamurl = NULL, *title = NULL, *tmpstr = NULL, *murl = NULL, *sig = NULL, *pic = NULL;
    2525
    2626        ip = string_replace("http://", "", (char*)link, 0);
     
    3636        tmppath = string_replace_all("watch?v=", "get_video_info?&video_id=", tmppath, 1);
    3737
    38         tmplink = ostrcat(link, NULL, 0, 0);
    39         tmplink = string_replace_all("watch?v=", "get_video_info?&video_id=", tmplink, 1);
    40         tmplink = string_replace_all("/youtu.be", "/www.youtube.com", tmplink, 1);
    41 
    4238/* spox.com
    4339
     
    4743
    4844and get to youtube
     45
     46// ssl workaround
     47                unlink("/tmp/.youtube.cache");
     48                char* cmd = NULL;
     49                cmd = ostrcat("wget --no-check-certificate \"http://", ip, 0, 0);
     50                cmd = ostrcat(cmd, "/", 1, 0);
     51                cmd = ostrcat(cmd, tmppath, 1, 0);
     52                cmd = ostrcat(cmd, "\" -O /tmp/.youtube.cache", 1, 0);
     53                debug(99, "cmd: %s", cmd);
     54                system(cmd);
     55                free(cmd), cmd = NULL;
     56                tmpstr = command("cat /tmp/.solar.cache");
     57                debug(99, "tmpstr: %s", tmpstr);
     58// ssl workaround end
     59//      tmpstr = gethttp(ip, tmppath, 80, NULL, NULL, 10000, NULL, 0);
    4960*/
    5061
    51         tmpstr = gethttps(tmplink, NULL, NULL, NULL, NULL, 1);
     62        tmpstr = gethttps(link, NULL, NULL, NULL, NULL, NULL, 1);
    5263        writesys("/var/usr/local/share/titan/plugins/tithek/youtube_tmpstr", tmpstr, 0);
    53         free(tmplink), tmplink = NULL;
     64
     65//13:50:32 T:2532  NOTICE: 'GET /youtube/v3/channels?part=snippet%2CcontentDetails%2CbrandingSettings&id=UC_fV2pzmw2SujuQgIm6YcbQ%2CUCWp1qqITrK2hQBpFTmE9uVg%2CUCClNRixXlagwAd--5MwJKCw%2CUCz6Lv-YT2Fjhi3GyXdXt4Vw%2CUC0g5OdpoCTfpHUelY9PLWSQ%2CUCXJDX1KK6t121Z9FLhu5o2A%2CUCboe4JAAUOI-OzKBj_pkYFg%2CUCT-_4GqC-yLY1xtTHhwY0hA%2CUCsW36751Gy-EAbHQwe9WBNw%2CUC1fIyfhQtm1fSljyKBf2uKA%2CUCy-dXLczRuq-ZtuWmUo52PA%2CUCq-Fj5jknLsUf-MWSy4_brA%2CUCe2r4-wNZjYmQhHrYAR2WUA%2CUC-v9ZU8TO8chuAOsh3UO-gQ%2CUCa6vGFO9ty8v5KZJXQxdhaw%2CUC5zGJZpxeZPFcds5gFcDE7Q%2CUC0y2acrGZ3NH-3ycSGYuIPQ%2CUCqyYNNx60mBgvNKKR5VhUCA%2CUCCgDVqiPU10shxzmwkMwJ6A%2CUCFeUyPY6W8qX8w2o6oSiRmw%2CUCl0kP-Cfe-GGic7Ilnk-u_Q%2CUCXkQVG6OdyB2ct4xOOZjmPQ%2CUCu17Sme-KE87ca9OTzP0p7g%2CUC2nZMhZ2qG5-xpqb440WLYg%2CUCYdIDs5a3Pt-o4SiD-ih24g&key=AIzaSyBAdxZCHbeJwnQ7dDZQJNfcaF46MdqJ24E HTTP/1.1\r\nHost: www.googleapis.com\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.36 Safari/537.36\r\nConnection: close\r\nAccept-Encoding: gzip, deflate\r\n\r\n'
     66
     67//      tmpstr = gethttps(link, NULL, NULL, NULL, NULL, NULL, 1);
     68//      writesys("/var/usr/local/share/titan/plugins/tithek/youtube_tmpstr", tmpstr, 0);
     69
     70//http://r7---sn-h0j7snel.googlevideo.com/videoplayback?source=youtube&gcr=de&ratebypass=yes&upn=32kjep7VPuc&initcwndbps=688750&expire=1443472674&sver=3&key=yt6&mn=sn-h0j7snel&mm=31&ip=95.91.6.76&sparams=dur%2Cgcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Csource%2Cupn%2Cexpire&pl=17&mv=m&mt=1443450913&ms=au&mime=video%2Fmp4&dur=249.173&id=o-APp6mA0M_837ohVW8yheCE2x2Ajd9KZ5GhoFWpMykdLR&ipbits=0&itag=22&fexp=9407155%2C9408508%2C9408710%2C9409069%2C9415365%2C9415485%2C9416023%2C9416729%2C9418448%2C9419484%2C9420215%2C9420348%2C9420818%2C9420928%2C9421013&lmt=1429610403267549&signature=
    5471
    5572//      if(flag == 1)
     
    7188                        struct menulist* mlist = NULL, *mbox = NULL;
    7289                        int count = 0, i = 0;
    73                         tmpstr = ostrcat(tmpstr,"&",0,0);
    74                         tmpstr = string_resub("url_encoded_fmt_stream_map=","&",tmpstr,0);
     90                        tmpstr = ostrcat(tmpstr, "&", 1, 0);
     91//                      tmpstr = string_resub("url_encoded_fmt_stream_map=","&",tmpstr,0);
    7592
    7693                        if(tmpstr != NULL)
    7794                        {
    78                                 ret1 = strsplit(string_decode(tmpstr,0),",",&count);
     95                                htmldecode(tmpstr,tmpstr);
     96                                writesys("/var/usr/local/share/titan/plugins/tithek/youtube_tmpstr_htmldecode1", tmpstr, 0);
     97                                htmldecode(tmpstr,tmpstr);
     98                                writesys("/var/usr/local/share/titan/plugins/tithek/youtube_tmpstr_htmldecode2", tmpstr, 0);
     99                                htmldecode(tmpstr,tmpstr);
     100                                writesys("/var/usr/local/share/titan/plugins/tithek/youtube_tmpstr_htmldecode3", tmpstr, 0);
     101                                htmldecode(tmpstr,tmpstr);
     102                                writesys("/var/usr/local/share/titan/plugins/tithek/youtube_tmpstr_htmldecode4", tmpstr, 0);
     103                                htmldecode(tmpstr,tmpstr);
     104                                writesys("/var/usr/local/share/titan/plugins/tithek/youtube_tmpstr_htmldecode5", tmpstr, 0);
     105                                tmpstr = string_replace_all("\n", " ", tmpstr, 1);
     106                                tmpstr = string_replace_all("&url=", "\n", tmpstr, 1);
     107                                writesys("/var/usr/local/share/titan/plugins/tithek/youtube_tmpstr_string_replace_all", tmpstr, 0);
     108
     109//                              ret1 = strsplit(string_decode(tmpstr,0),",",&count);
     110                                ret1 = strsplit(tmpstr,"\n",&count);
    79111
    80112                                for(i = 0; i < count; i++)
     
    85117                                                ret1[i].part = ostrcat(ret1[i].part,"&",0,0);
    86118                                               
    87                                                 murl = string_resub("url=","&",ret1[i].part,0);
    88                                                 sig = string_resub("sig=","&",ret1[i].part,0);
    89                                                
    90                                                 free(streamurl), streamurl = NULL;
     119                                                murl = string_resub("url=", "&", ret1[i].part, 0);
     120                                                sig = string_resub("sig=", "&", ret1[i].part, 0);
     121                                                if(sig == NULL)
     122                                                        sig = string_resub("s=", "&", ret1[i].part, 0);
     123
     124                                                streamurl = ostrcat(ret1[i].part, NULL, 0, 0);
     125                                                streamurl = string_replace_all(",itag=", "\0", streamurl, 1);
     126
     127//                                              free(streamurl), streamurl = NULL;
    91128//                                              if(murl != NULL && sig != NULL)
    92                                                 if(murl != NULL)
    93                                                 {                                       
     129//                                              if(murl != NULL)
     130                                                if(streamurl != NULL)
     131                                                {
     132/*
    94133                                                        streamurl = ostrcat(murl, NULL, 0, 0);
    95134                                                        streamurl = ostrcat(streamurl, "&signature=", 1, 0);
    96135                                                        streamurl = ostrcat(streamurl, sig, 1, 0);
    97136                                                        streamurl = string_decode(streamurl,0);
    98                                                                                                                        
     137*/                                                                                                                     
    99138                                                        if(ostrstr(ret1[i].part, "itag=85") != NULL)
    100139                                                        {
     
    273312
    274313                char* tmpstr = NULL;
    275                 tmpstr = gethttps(url, NULL, NULL, NULL, NULL, 1);             
     314                tmpstr = gethttps(url, NULL, NULL, NULL, NULL, NULL, 1);               
     315//              tmpstr = gethttp(ip, path, 80, NULL, NULL, 10000, NULL, 0);
    276316                writesys("/var/usr/local/share/titan/plugins/tithek/tmpstr1", tmpstr, 0);
     317printf("ALLE\n");
    277318
    278319                tmpstr = stringreplacechar(tmpstr, '\n', ' ');
     
    282323                tmpstr = string_replace_all("media:thumbnail", "\nthumbnail", tmpstr, 1);
    283324                writesys("/var/usr/local/share/titan/plugins/tithek/tmpstr2", tmpstr, 0);
    284 
     325/*
     326
     327//12:39:28 T:11340  NOTICE: 'GET /youtube/v3/videos?part=snippet%2CcontentDetails&id=eOxPED0TunI%2CsojYfBmdvlE%2Cj-ocHL0eudY%2CHQBia-CfqbE%2CmHLwXQoG4CU%2Cw5VFOKKAbQQ%2CvnoQ5lkBVhU%2CeocCPDxKq1o%2ChSjIz8oQuko%2CJDKGWaCglRM%2CbZsqdTrr1eM%2CyTCDVfMz15M%2CHq2DINl2MxI%2CnB2Hsh1XqyA%2C41aGCrXM20E%2Cuc8OpUnUNNU%2Cv4UkD7U88NQ%2CAlMa52Xkoj0%2CocDlOD1Hw9k%2CG6ZLZQGydPc%2CxXvBkwihOE8%2CNJWIbIe0N90%2CwCqs2uJWwZs%2CPl-TCZSRhy4%2C0TDTEEXZtLs%2CXIId4uESVeA%2ClHSl-yz5FqA%2CRzriJpYiGjw%2CjT5RwB5ML30%2C5r9vdqAFCY4%2CzsmUOdmm02A%2C8WmZW7JB3GY%2C3NrNWISh5CE%2CeDtMxamBxI8%2CBR4yQFZK9YM%2CRAcNZo7-f0g%2CXjVNlG5cZyQ%2CasaCQOZpqUQ%2CWWYLM9opelw%2CqOfkpu6749w%2CBJLWNWDqK-k%2COpQFFLBMEPI%2Cm-6ir-gFpbA%2C3stsDXki__U%2C57KVfhWcEk0%2CFJfFZqTlWrQ%2CSNjFTxaeWug%2CumM9Ls0SaiU%2Cw7JRWHCKkIY%2C6lyq05OWuVM&key=AIzaSyBAdxZCHbeJwnQ7dDZQJNfcaF46MdqJ24E HTTP/1.1\r\nHost: www.googleapis.com\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.36 Safari/537.36\r\nConnection: close\r\nAccept-Encoding: gzip, deflate\r\n\r\n'
     328/youtube/v3/videos?part=snippet%2CcontentDetails
     329&id=
     330eOxPED0TunI
     331%2
     332CsojYfBmdvlE
     333%2
     334Cj-ocHL0eudY
     335%2
     336CHQBia-CfqbE
     337%2
     338CmHLwXQoG4CU
     339%2
     340Cw5VFOKKAbQQ%2CvnoQ5lkBVhU%2CeocCPDxKq1o%2ChSjIz8oQuko%2CJDKGWaCglRM%2CbZsqdTrr1eM%2CyTCDVfMz15M%2CHq2DINl2MxI%2CnB2Hsh1XqyA
     341%2C41aGCrXM20E%2Cuc8OpUnUNNU%2Cv4UkD7U88NQ%2CAlMa52Xkoj0%2CocDlOD1Hw9k%2CG6ZLZQGydPc%2CxXvBkwihOE8%2CNJWIbIe0N90%2CwCqs2uJWwZs%2CPl-TCZSRhy4
     342%2C0TDTEEXZtLs%2CXIId4uESVeA%2ClHSl-yz5FqA%2CRzriJpYiGjw%2CjT5RwB5ML30%2C5r9vdqAFCY4%2CzsmUOdmm02A%2C8WmZW7JB3GY%2C3NrNWISh5CE%2CeDtMxamBxI8
     343%2CBR4yQFZK9YM%2CRAcNZo7-f0g%2CXjVNlG5cZyQ%2CasaCQOZpqUQ%2CWWYLM9opelw%2CqOfkpu6749w%2CBJLWNWDqK-k
     344%2COpQFFLBMEPI%2Cm-6ir-gFpbA
     345%2C3stsDXki__U%2C57KVfhWcEk0%2CFJfFZqTlWrQ%2CSNjFTxaeWug%2CumM9Ls0SaiU%2Cw7JRWHCKkIY%2C6lyq05OWuVM
     346
     347&key=AIzaSyBAdxZCHbeJwnQ7dDZQJNfcaF46MdqJ24E HTTP/1.1\r\nHost: www.googleapis.com\r\nUser-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.36 Safari/537.36\r\nConnection: close\r\nAccept-Encoding: gzip, deflate\r\n\r\n'
     348
     349"title": "
     350"videoId": "
     351"url": "
     352*/
    285353                int count = 0;
    286354                int incount = 0;
     
    288356                struct splitstr* ret1 = NULL;
    289357                ret1 = strsplit(tmpstr, "\n", &count);
     358//part="etag": "\"jOXstHOM20qemPbHbyzf7ztZ7rI/zJExHKkQXAGmI7-mKIkjbmndgJ0\"",    "id": {     "kind": "youtube#video",     "videoId": "57KVfhWcEk0"    },    "snippet": {     "publishedAt": "2015-09-19T02:06:39.000Z",     "channelId": "UCwehWhlhepFE8mFdlC1ebAw",     "title": "Pink - Mindless Self Indulgence FULL ALBUM",     "description": "JIMMY SAYS TO BUY THE FUCKING ALBUM Tracklist: 01. Personal Jesus 02. This Hurts 03. Be Like Superman 04. Memory Of Heaven 05. Vanity 06. Married ...",     "thumbnails": {      "default": {       "url": "https://i.ytimg.com/vi/57KVfhWcEk0/default.jpg"      },      "medium": {       "url": "https://i.ytimg.com/vi/57KVfhWcEk0/mqdefault.jpg"      },      "high": {       "url": "https://i.ytimg.com/vi/57KVfhWcEk0/hqdefault.jpg"      }     },     "channelTitle": "",     "liveBroadcastContent": "none"    }   }  ] }
    290359
    291360                if(ret1 != NULL)
     
    297366                                if(ostrstr(ret1[i].part, "videoId") != NULL)
    298367                                {
     368//                                      pic = oregex(".*thumbnail url=\'(http://i.ytimg.com/vi/.*/.*.jpg).*media:title.*", ret1[i].part);
     369//                                      id = oregex(".*thumbnail url=\'http://i.ytimg.com/vi/(.*)/.*.jpg.*media:title.*", ret1[i].part);
     370//                                      title = oregex(".*<media:title type='plain'>(.*)</media:title>.*", ret1[i].part);
     371
    299372                                        pic = string_resub("\"url\": \"", "\"", ret1[i].part, 0);
    300373                                        id = string_resub("\"videoId\": \"", "\"", ret1[i].part, 0);
     
    307380                                        int rcret = waitrc(NULL, 10, 0);
    308381                                        if(rcret == getrcconfigint("rcexit", NULL)) break;
    309 
     382//www.googleapis.com/youtube/v3/videos?part=snippet%2CcontentDetails&id=eOxPED0TunI%2CsojYfBmdvlE%2Cj-ocHL0eudY%2CHQBia-CfqbE%2CmHLwXQoG4CU%2Cw5VFOKKAbQQ%2CvnoQ5lkBVhU%2CeocCPDxKq1o%2ChSjIz8oQuko%2CJDKGWaCglRM%2CbZsqdTrr1eM%2CyTCDVfMz15M%2CHq2DINl2MxI%2CnB2Hsh1XqyA%2C41aGCrXM20E%2Cuc8OpUnUNNU%2Cv4UkD7U88NQ%2CAlMa52Xkoj0%2CocDlOD1Hw9k%2CG6ZLZQGydPc%2CxXvBkwihOE8%2CNJWIbIe0N90%2CwCqs2uJWwZs%2CPl-TCZSRhy4%2C0TDTEEXZtLs%2CXIId4uESVeA%2ClHSl-yz5FqA%2CRzriJpYiGjw%2CjT5RwB5ML30%2C5r9vdqAFCY4%2CzsmUOdmm02A%2C8WmZW7JB3GY%2C3NrNWISh5CE%2CeDtMxamBxI8%2CBR4yQFZK9YM%2CRAcNZo7-f0g%2CXjVNlG5cZyQ%2CasaCQOZpqUQ%2CWWYLM9opelw%2CqOfkpu6749w%2CBJLWNWDqK-k%2COpQFFLBMEPI%2Cm-6ir-gFpbA%2C3stsDXki__U%2C57KVfhWcEk0%2CFJfFZqTlWrQ%2CSNjFTxaeWug%2CumM9Ls0SaiU%2Cw7JRWHCKkIY%2C6lyq05OWuVM&key=AIzaSyBAdxZCHbeJwnQ7dDZQJNfcaF46MdqJ24E
    310383                                        if(id != NULL)
    311384                                        {
     
    315388
    316389                                                line = ostrcat(line, title, 1, 0);
    317                                                 line = ostrcat(line, "#http://www.youtube.com/get_video_info?&video_id=", 1, 0);
     390                                                line = ostrcat(line, "#https://www.youtube.com/get_video_info?&video_id=", 1, 0);
    318391                                                line = ostrcat(line, id, 1, 0);
     392                                                                                               
    319393//                                              line = ostrcat(line, "#http://www.youtube.com/get_video_info?el=leanback&cplayer=UNIPLAYER&cos=Windows&height=1080&cbr=Chrome&hl=en_US&cver=4&ps=leanback&c=TVHTML5&video_id=", 1, 0);
    320394//                                              line = ostrcat(line, id, 1, 0);
    321395//                                              line = ostrcat(line, "&cbrver=40.0.2214.115&width=1920&cosver=6.1&ssl_stream=1", 1, 0);
     396
     397//www.youtube.com/get_video_info?el=leanback&cplayer=UNIPLAYER&cos=Windows&height=1080&cbr=Chrome&hl=en_US&cver=4&ps=leanback&c=TVHTML5&video_id=yTCDVfMz15M&cbrver=40.0.2214.115&width=1920&cosver=6.1&ssl_stream=1
     398
     399//                                              line = ostrcat(line, "#https://www.googleapis.com/youtube/v3/videos?part=snippet%2CcontentDetails&id=", 1, 0);
     400//                                              line = ostrcat(line, id, 1, 0);
     401//                                              line = ostrcat(line, "&key=AIzaSyBAdxZCHbeJwnQ7dDZQJNfcaF46MdqJ24E", 1, 0);
    322402                                                line = ostrcat(line, "#", 1, 0);
    323403                                                line = ostrcat(line, pic, 1, 0);
Note: See TracChangeset for help on using the changeset viewer.