Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.16 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. document.location.href = j.vod.copies[j.vod.copies.length - 1].url;
  27. };
  28. req.send(null);
  29. } else if (document.location.href.indexOf('vod.tvp.pl') > -1) {
  30. if (document.location.href.indexOf('odc') > -1) {
  31. var link = window.location.href;
  32. var x = link.split(",");
  33. xmlhttp = new XMLHttpRequest();
  34. xmlhttp.open('GET', 'https://www.tvp.pl/shared/cdn/tokenizer_v2.php?object_id=' + x[x.length - 1], false);
  35. xmlhttp.send();
  36. j = JSON.parse(xmlhttp.responseText);
  37. var najlepszajakosc = "";
  38. var b = 0;
  39. for (var i = 0; i < j.formats.length; i++) {
  40. if (j.formats[i].mimeType == 'video\/mp4' && j.formats[i].totalBitrate > b) {
  41. b = j.formats[i].totalBitrate;
  42. najlepszajakosc = j.formats[i].url;
  43. }
  44. }
  45. document.location.href = najlepszajakosc;
  46. } else {
  47. var link = window.location.href.split('/');
  48. var nazwa = link[link.length - 1].split(',');
  49. var links = document.getElementsByClassName("playInPlayer");
  50. for (var i = links.length - 1; i >= 0; i--) {
  51. if (links[i].href.indexOf(nazwa[nazwa.length - 2]) > -1) {
  52. var linkq = links[i].href;
  53. var x = linkq.split(",");
  54. xmlhttp = new XMLHttpRequest();
  55. xmlhttp.open('GET', 'https://www.tvp.pl/shared/cdn/tokenizer_v2.php?object_id=' + x[x.length - 1], false);
  56. xmlhttp.send();
  57. j = JSON.parse(xmlhttp.responseText);
  58. if (j.status == 'OK') {
  59. var najlepszajakosc = "";
  60. var b = 0;
  61. for (var i = 0; i < j.formats.length; i++) {
  62. if (j.formats[i].mimeType == 'video\/mp4' && j.formats[i].totalBitrate > b) {
  63. b = j.formats[i].totalBitrate;
  64. najlepszajakosc = j.formats[i].url;
  65. }
  66. }
  67. document.location.href = najlepszajakosc;
  68. break;
  69. }
  70. }
  71. }
  72. }
  73. } else if (document.location.href.indexOf('player.pl') > -1) {
  74. if (document.location.href.indexOf('odcinek') > -1) {
  75. var link = window.location.href.split(',');
  76. xmlhttp = new XMLHttpRequest();
  77. xmlhttp.open("GET", "/api/?platform=ConnectedTV&terminal=Panasonic&format=json&authKey=064fda5ab26dc1dd936f5c6e84b7d3c2&v=3.1&m=getItem&id=" + link[link.length - 1], false);
  78. xmlhttp.send();
  79. o = JSON.parse(xmlhttp.responseText);
  80. document.location.href = o.item.videos.main.video_content[2].url;
  81. } else {
  82. var links = document.getElementsByClassName("embed-responsive-item ");
  83. for (var i = 0; i < links.length; i++) {
  84. if (links[i].href.indexOf(window.location.href) > -1) {
  85. var link = links[i].href.split(',');
  86. xmlhttp = new XMLHttpRequest();
  87. xmlhttp.open("GET", "/api/?platform=ConnectedTV&terminal=Panasonic&format=json&authKey=064fda5ab26dc1dd936f5c6e84b7d3c2&v=3.1&m=getItem&id=" + link[link.length - 1], false);
  88. xmlhttp.send();
  89. o = JSON.parse(xmlhttp.responseText);
  90. try {
  91. document.location.href = o.item.videos.main.video_content[2].url;
  92. break;
  93. } catch (err) {}
  94. }
  95. }
  96. }
  97. } else {
  98. var opened = window.open("");
  99. 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>");
  100. }
  101. })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement