source: titan/plugins/tithek/cloudzilla.h @ 40893

Last change on this file since 40893 was 36083, checked in by obi, 8 years ago

fix

File size: 3.1 KB
Line 
1#ifndef CLOUDZILLA_H
2#define CLOUDZILLA_H
3
4char* cloudzilla(char* link)
5{
6        debug(99, "link: %s", link);
7        int debuglevel = getconfigint("debuglevel", NULL);
8        char* tmpstr = NULL, *streamlink = NULL, *url = NULL;
9
10        if(link == NULL) return NULL;
11
12        unlink("/var/usr/local/share/titan/plugins/tithek//cloudzilla1_get");
13        unlink("/var/usr/local/share/titan/plugins/tithek//cloudzilla2_streamlink");
14/////////////
15
16        url = string_replace("/share/file/", "/embed/", link, 0);
17
18/*
19http://cloudzilla.to/share/file/II5CP0EMM0DDTCA60FWDQLVX5/
20http://cloudzilla.to/embed/II5CP0EMM0DDTCA60FWDQLVX5
21'GET /embed/II5CP0EMM0DDTCA60FWDQLVX5 HTTP/1.1\r\nHost: neodrive.co\r\nUser-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.99 Safari/535.1\r\nConnection: close\r\nAccept-Encoding: gzip\r\n\r\n'
22u'GET /stream/PL5S1TKUPLTP/4227909300e1f2ce48481e9f321c0ca0.mp4?st=IhfWZn-3wNuMYgq3ROwqNQ HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: d1.neodrive.co\r\nConnection: close\r\nUser-Agent: Python-urllib/2.7\r\n\r\n'
23http://d1.neodrive.co/stream/PL5S1TKUPLTP/4227909300e1f2ce48481e9f321c0ca0.mp4?st=IhfWZn-3wNuMYgq3ROwqNQ
24
25
26http://cloudzilla.me/g5oi83o7260u
27'GET /embed-g5oi83o7260u.html HTTP/1.1\r\nHost: cloudzilla.me\r\nUser-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.99 Safari/535.1\r\nConnection: close\r\nAccept-Encoding: gzip\r\n\r\n'
28'GET /ikjtbmjr5woammfvg77fchotfr76hz35ahh6bglfezhodqxskyt544voxnpq/v.mp4 HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: d2171.cloudzilla.me:8777\r\nCookie: __cfduid=de1d2f326ba9713a1f3a8497c518c5ee01441986583\r\nConnection: close\r\nUser-Agent: Python-urllib/2.7\r\n\r\n'
29http://d2171.cloudzilla.me:8777/ikjtbmjr5woammfvg77fchotfr76hz35ahh6bglfezhodqxskyt544voxnpq/v.mp4
30http://d2171.cloudzilla.me:8777/ikjtbmjr5woammfvg77fchotfr76hz35ahh6bglfezhodqxskyt544voxnpq/v.mp4|User-Agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 -> application/octet-stream
31*/
32
33        debug(99, "url: %s", url);
34        tmpstr = gethttps(url, NULL, NULL, NULL, NULL, NULL, 1);
35        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek//cloudzilla1_get", NULL, NULL, NULL, tmpstr); 
36
37        if(tmpstr == NULL)
38        {
39                textbox(_("Message"), _("The page is temporarily unavailable") , _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1200, 200, 0, 0);
40                goto end;
41        }
42
43        if(ostrstr(tmpstr, "404 Not Found") != NULL)
44        {
45                textbox(_("Message"), _("The video no longer exists") , _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1200, 200, 0, 0);
46                goto end;
47        }
48
49        if(ostrstr(tmpstr, "video not found") != NULL)
50        {
51                textbox(_("Message"), _("The video no longer exists") , _("OK"), getrcconfigint("rcok", NULL), _("EXIT"), getrcconfigint("rcexit", NULL), NULL, 0, NULL, 0, 1200, 200, 0, 0);
52                goto end;
53        }
54
55        streamlink = string_resub("var vurl = \"", "\"", tmpstr, 0);
56
57        titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek//cloudzilla1_streamlink", NULL, NULL, NULL, streamlink);
58
59end:
60
61        free(url); url = NULL;
62        free(tmpstr); tmpstr = NULL;
63
64        return streamlink;
65}
66
67#endif
Note: See TracBrowser for help on using the repository browser.