Changeset 40864
- Timestamp:
- 08/29/17 00:25:33 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/tithek/kinox.h
r40861 r40864 349 349 for(i = 0; i < max; i++) 350 350 { 351 352 // printf("ret1[i].part: %s\n",ret1[i].part);353 354 351 char *mirrormaxtmp = NULL; 355 352 char *pathnewtmp = NULL; 353 int mirrormax = 1; 354 int j = 0; 355 356 356 mirrormaxtmp = oregex("<b>Mirror</b>: .*/(.*)<br/>.*", ret1[i].part); 357 printf("mirrormaxtmp: %s\n",mirrormaxtmp); 358 359 int mirrormax = atoi(mirrormaxtmp); 360 printf("mirrormax: %d\n",mirrormax); 361 362 int j = 0; 363 for(j = 1; j < mirrormax + 1; j++) 364 { 365 366 hnr = string_resub("<li id=\"Hoster_", "\"", ret1[i].part, 0); 367 368 hlink = string_resub("rel=\"", "amp;Mirror", ret1[i].part, 0); 369 hlink = string_replace_all("amp;Hoster", "Hoster", hlink, 1); 370 hlink = ostrcat(hlink, "Mirror=", 0, 0); 371 372 373 374 hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0); 375 pathnewtmp = ostrcat("/aGET/Mirror/", hlink, 0, 0); 376 377 // printf("hnr: %s\n",hnr); 378 // printf("hlink: %s\n",hlink); 379 // printf("hname: %s\n",hname); 380 381 /* 382 hnr = string_resub("<li id=\"Hoster_", "\"", ret1[i].part, 0); 383 hlink = string_resub("rel=\"", "\">", ret1[i].part, 0); 384 hlink = string_replace_all("amp;", "", hlink, 1); 385 386 hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0); 387 pathnew = ostrcat("/aGET/Mirror/", hlink, 0, 0); 388 */ 389 357 358 if(mirrormaxtmp != NULL) 359 mirrormax = atoi(mirrormaxtmp); 360 361 for(j = 1; j < mirrormax + 1; j++) 362 { 363 debug(99, "(%d/%d) (%d/%d) ret1[i].part: %s",i ,max ,j ,mirrormax, ret1[i].part); 364 365 hnr = string_resub("<li id=\"Hoster_", "\"", ret1[i].part, 0); 366 367 hlink = string_resub("rel=\"", "amp;Mirror", ret1[i].part, 0); 368 hlink = string_replace_all("amp;Hoster", "Hoster", hlink, 1); 369 hlink = ostrcat(hlink, "Mirror=", 0, 0); 370 371 hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0); 372 pathnewtmp = ostrcat("/aGET/Mirror/", hlink, 0, 0); 390 373 391 374 pathnew = ostrcat(pathnewtmp, oitoa(j), 0, 1); 375 debug(99, "(%d/%d) (%d/%d)hnr: %s hlink: %s hname: %s pathnewtmp: %s",i ,max ,j ,mirrormax ,hnr ,hlink ,hname ,pathnewtmp); 392 376 free(pathnewtmp), pathnewtmp= NULL; 393 394 // printf("pathnew: %s\n",pathnew);395 377 396 378 pichname = ostrcat(hname, NULL, 0, 0); … … 401 383 402 384 titheklog(debuglevel, "/tmp/kinox4_pathnew1", hname, NULL, NULL, pathnew); 403 385 404 386 tmpstr1 = gethttp("kinox.me", pathnew, 80, NULL, NULL, 10000, NULL, 0); 405 387 if(ostrstr(tmpstr1, "503 Service Temporarily Unavailable") != NULL) … … 511 493 if(ostrcmp(url, url2) != 0) 512 494 { 513 debug(99, "(%d/%d) %s (Part1) url: %s extra: %s",i ,max , hname, url,extra);495 debug(99, "(%d/%d) (%d/%d) %s (Part1) url: %s extra: %s",i ,max ,j ,mirrormax ,hname ,url ,extra); 514 496 } 515 497 else 516 498 { 517 debug(99, "(%d/%d) %s url: %s extra: %s",i ,max , hname, url,extra);499 debug(99, "(%d/%d) (%d/%d) %s url: %s extra: %s",i ,max ,j ,mirrormax ,hname ,url ,extra); 518 500 } 519 501 … … 534 516 535 517 line = ostrcat(line, " (Mirror ", 1, 0); 536 line = ostrcat(line, oitoa(j), 1, 0);518 line = ostrcat(line, oitoa(j), 1, 1); 537 519 line = ostrcat(line, "/", 1, 0); 538 line = ostrcat(line, oitoa(mirrormax), 1, 0);520 line = ostrcat(line, oitoa(mirrormax), 1, 1); 539 521 line = ostrcat(line, ")", 1, 0); 540 522 … … 798 780 for(i = 0; i < max; i++) 799 781 { 800 //801 // printf("ret1[i].part: %s\n",ret1[i].part);802 803 782 char *mirrormaxtmp = NULL; 804 783 char *pathnewtmp = NULL; 805 784 char *season = NULL; 806 mirrormaxtmp = oregex("<b>Mirror</b>: .*/(.*)<br/>.*", ret1[i].part); 785 int mirrormax = 1; 786 int j = 0; 787 807 788 mirrormaxtmp = oregex("<b>Mirror</b>: .*/(.*)<br.*", ret1[i].part); 808 // 809 // printf("mirrormaxtmp: %s\n",mirrormaxtmp); 810 811 int mirrormax = atoi(mirrormaxtmp); 812 // printf("mirrormax: %d\n",mirrormax); 813 814 //rel="Game_of_Thrones-Das_Lied_von_Eis_und_Feuer&Hoster=68&Mirror=1&Season=7&Episode=6"> 815 816 817 int j = 0; 789 790 if(mirrormaxtmp != NULL) 791 mirrormax = atoi(mirrormaxtmp); 792 free(mirrormaxtmp), mirrormaxtmp= NULL; 793 818 794 for(j = 1; j < mirrormax + 1; j++) 819 795 { 796 debug(99, "(%d/%d) (%d/%d) ret1[i].part: %s",i ,max ,j ,mirrormax, ret1[i].part); 820 797 821 798 hnr = string_resub("<li id=\"Hoster_", "\"", ret1[i].part, 0); … … 825 802 hlink = ostrcat(hlink, "Mirror=", 0, 0); 826 803 827 828 804 hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0); 829 805 pathnewtmp = ostrcat("/aGET/Mirror/", hlink, 0, 0); … … 832 808 season = string_replace_all("amp;", "", season, 1); 833 809 834 835 // printf("hnr: %s\n",hnr); 836 // printf("hlink: %s\n",hlink); 837 // printf("hname: %s\n",hname); 838 // printf("pathnewtmp: %s\n",pathnewtmp); 839 // printf("season: %s\n",season); 840 841 842 pathnew = ostrcat(pathnewtmp, oitoa(j), 0, 1); 843 pathnew = ostrcat(pathnew, "&Season=", 1, 0); 844 pathnew = ostrcat(pathnew, season, 1, 0); 845 free(pathnewtmp), pathnewtmp= NULL; 846 //printf("11111111pathnew: %s\n",pathnew); 847 848 /* 849 hnr = string_resub("<li id=\"Hoster_", "\"", ret1[i].part, 0); 850 hlink = string_resub("rel=\"", "\">", ret1[i].part, 0); 851 hlink = string_replace_all("amp;", "", hlink, 1); 852 hname = string_resub("<div class=\"Named\">", "</div>", ret1[i].part, 0); 853 */ 810 pathnew = ostrcat(pathnewtmp, oitoa(j), 0, 1); 811 pathnew = ostrcat(pathnew, "&Season=", 1, 0); 812 pathnew = ostrcat(pathnew, season, 1, 0); 813 814 debug(99, "(%d/%d) (%d/%d) hnr: %s hlink: %s season: %s hname: %s pathnewtmp: %s",i ,max ,j ,mirrormax ,hnr ,hlink ,season ,hname ,pathnewtmp); 815 816 free(season), season= NULL; 817 free(pathnewtmp), pathnewtmp= NULL; 818 854 819 pichname = ostrcat(hname, NULL, 0, 0); 855 820 string_tolower(pichname); … … 861 826 hlink = string_replace("http://kinox.me/Stream/", "", hlink, 1); 862 827 863 // pathnew = ostrcat("/aGET/Mirror/", hlink, 0, 0); 864 // debug(99, "pathnew: %s", pathnew); 828 debug(99, "pathnew: %s", pathnew); 865 829 tmpstr1 = gethttp("kinox.me", pathnew, 80, NULL, NULL, 10000, NULL, 0); 866 // pathnew = ostrcat("kinox.me/aGET/Mirror/", hlink, 0, 0); 867 868 869 // printf("ret1[i].part: %s\n",ret1[i].part); 870 871 872 debug(99, "pathnew: %s", pathnew); 873 // tmpstr1 = gethttps(pathnew, NULL, NULL, NULL, NULL, NULL, 1); 874 // debug(99, "tmpstr1 1: %s", tmpstr1); 875 830 debug(99, "tmpstr1 1: %s", tmpstr1); 876 831 877 832 tmpstr1 = string_replace_all("\\", "", tmpstr1, 1); … … 910 865 911 866 debug(99, "-------------------------------"); 912 debug(99, "(%d/%d) %s url: %s extra: %s",i ,max, hname, url, extra);867 debug(99, "(%d/%d) (%d/%d) %s url: %s extra: %s", i, max, j, mirrormax, hname, url, extra); 913 868 914 869 incount += 1; … … 927 882 928 883 line = ostrcat(line, " (Mirror ", 1, 0); 929 line = ostrcat(line, oitoa(j), 1, 0);884 line = ostrcat(line, oitoa(j), 1, 1); 930 885 line = ostrcat(line, "/", 1, 0); 931 line = ostrcat(line, oitoa(mirrormax), 1, 0);886 line = ostrcat(line, oitoa(mirrormax), 1, 1); 932 887 line = ostrcat(line, ")", 1, 0); 933 888
Note: See TracChangeset
for help on using the changeset viewer.