Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.33 KB | None | 0 0
  1. javascript: void(function() {
  2. if (location.href.match(/^http[s]?:\/\/www\.ipla\.tv\//)) {
  3. var link = window.location.href;
  4. var x = link.split("/"); /*var newLink = 'http://getmedia.redefine.pl/vods/get_vod/?cpid=1&ua=mipla_ios/122&media_id=';*/
  5. var newLink = 'http://getmedia.redefine.pl/vods/get_vod/?cpid=1&ua=www_iplatv_html5/12345&media_id=';
  6. if (x.length > 7) {
  7. var idn = x[x.length - 1];
  8. newLink += idn;
  9. } else {
  10. var links = document.getElementsByClassName("list-element__link vod-link");
  11. for (var i = 0; i < links.length; i++) {
  12. if (!(links[i].href.indexOf('Kulisy') > -1)) {
  13. x = links[i].href.split("/");
  14. break;
  15. }
  16. }
  17. newLink += x[x.length - 1];
  18. }
  19. document.location.href = newLink;
  20. } else if (location.href.match(/^http[s]?:\/\/getmedia\.redefine\.pl\//)) {
  21. var req = new XMLHttpRequest();
  22. req.responseType = 'json';
  23. req.open('GET', window.location.href, true);
  24. req.onload = function() {
  25. var j = req.response;
  26. var o= window.open("");
  27. for(var i=0;i<j.vod.copies.length;i++){
  28. document.write("jakość: "+j.vod.copies[i].quality_p+"<br><a href='"+j.vod.copies[i].url+"'>"+j.vod.copies[i].url+"</a><br><br>");
  29. }
  30. };
  31. req.send(null);
  32. } else if (document.location.href.indexOf('vod.tvp.pl') > -1) {
  33. if (document.location.href.indexOf('odc') > -1) {
  34. var link = window.location.href;
  35. var x = link.split(",");
  36. xmlhttp = new XMLHttpRequest();
  37. xmlhttp.open('GET', 'https://www.tvp.pl/shared/cdn/tokenizer_v2.php?object_id=' + x[x.length - 1], false);
  38. xmlhttp.send();
  39. j = JSON.parse(xmlhttp.responseText);
  40. var najlepszajakosc = "";
  41. var b = 0;
  42. for (var i = 0; i < j.formats.length; i++) {
  43. if (j.formats[i].mimeType == 'video\/mp4' && j.formats[i].totalBitrate > b) {
  44. b = j.formats[i].totalBitrate;
  45. najlepszajakosc = j.formats[i].url;
  46. }
  47. }
  48. document.location.href = najlepszajakosc;
  49. } else {
  50. var link = window.location.href.split('/');
  51. var nazwa = link[link.length - 1].split(',');
  52. var links = document.getElementsByClassName("playInPlayer");
  53. for (var i = links.length - 1; i >= 0; i--) {
  54. if (links[i].href.indexOf(nazwa[nazwa.length - 2]) > -1) {
  55. var linkq = links[i].href;
  56. var x = linkq.split(",");
  57. xmlhttp = new XMLHttpRequest();
  58. xmlhttp.open('GET', 'https://www.tvp.pl/shared/cdn/tokenizer_v2.php?object_id=' + x[x.length - 1], false);
  59. xmlhttp.send();
  60. j = JSON.parse(xmlhttp.responseText);
  61. if (j.status == 'OK') {
  62. var najlepszajakosc = "";
  63. var b = 0;
  64. for (var i = 0; i < j.formats.length; i++) {
  65. if (j.formats[i].mimeType == 'video\/mp4' && j.formats[i].totalBitrate > b) {
  66. b = j.formats[i].totalBitrate;
  67. najlepszajakosc = j.formats[i].url;
  68. }
  69. }
  70. document.location.href = najlepszajakosc;
  71. break;
  72. }
  73. }
  74. }
  75. }
  76. } else if (document.location.href.indexOf('player.pl') > -1) {
  77. if (document.location.href.indexOf('odcinek') > -1) {
  78. var link = window.location.href.split(',');
  79. xmlhttp = new XMLHttpRequest();
  80. xmlhttp.open("GET", "/api/?platform=ConnectedTV&terminal=Panasonic&format=json&authKey=064fda5ab26dc1dd936f5c6e84b7d3c2&v=3.1&m=getItem&id=" + link[link.length - 1], false);
  81. xmlhttp.send();
  82. o = JSON.parse(xmlhttp.responseText);
  83. document.location.href = o.item.videos.main.video_content[2].url;
  84. } else {
  85. var links = document.getElementsByClassName("embed-responsive-item ");
  86. for (var i = 0; i < links.length; i++) {
  87. if (links[i].href.indexOf(window.location.href) > -1) {
  88. var link = links[i].href.split(',');
  89. xmlhttp = new XMLHttpRequest();
  90. xmlhttp.open("GET", "/api/?platform=ConnectedTV&terminal=Panasonic&format=json&authKey=064fda5ab26dc1dd936f5c6e84b7d3c2&v=3.1&m=getItem&id=" + link[link.length - 1], false);
  91. xmlhttp.send();
  92. o = JSON.parse(xmlhttp.responseText);
  93. try {
  94. document.location.href = o.item.videos.main.video_content[2].url;
  95. break;
  96. } catch (err) {}
  97. }
  98. }
  99. }
  100. } else {
  101. var opened = window.open("");
  102. opened.document.write(" <html> <head> <style> body {background-color:#99FFCC;} a {text-decoration: none; color:black;} a:hover {color: blue;} #inner {display: table; margin: 0 auto;text-align: center;} </style> <title>Seriale</title> </head> <body> <div id='inner'> <h1><a href='https://www.ipla.tv/wideo/serial/Sprawiedliwi-Wydzial-Kryminalny/5009543' target='_blank'>Sprawiedliwi Wydział‚ Kryminalny</a></h1> <h1><a href='https://www.ipla.tv/wideo/serial/Policjantki-I-Policjanci/5003132' target='_blank'>Policjantki i Policjanci</a></h1> <h1><a href='https://vod.tvp.pl/website/korona-krolow,34807622' target='_blank'>Korona Królów</a></h1> <h1><a href='https://player.pl/seriale-online/19--odcinki,4814' target='_blank'>19+</a></h1> <h1><a href='https://vod.tvp.pl/website/na-dobre-i-na-zle,8514270' target='_blank'>Na dobre i na zł‚e</a></h1> <h1><a href='https://vod.tvp.pl/website/m-jak-milosc,1654521' target='_blank'>M jak miłość‡</a></h1> <h1><a href='https://www.ipla.tv/wideo/serial/W-rytmie-serca/5011030' target='_blank'>W rytmie serca</a></h1> <h1><a href='https://vod.tvp.pl/website/na-sygnale,13883615' target='_blank'>Na sygnale</a></h1> </div> </body> </html>");
  103. }
  104. })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement