Mayx's Home Page https://mabbs.github.io
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.4 KiB

  1. <title>Iwara Downloader</title>
  2. <h1>Iwara Downloader</h1>
  3. URL: <input type="text" id="url" /> <button onclick="resolve()">Resolve</button>
  4. <table id="result-table" border="1" style="display:none">
  5. <tr><th>Resolution</th><th>URI</th><th>IP</th><th>Host</th></tr>
  6. <tbody id="result"></tbody>
  7. </table>
  8. <script src="/js/jquery.min.js"></script>
  9. <script>
  10. function resolve(){
  11. $("#result-table").css('display', "none");
  12. $("#result").empty();
  13. $.get("https://iwara.mayx.eu.org/api/video/" + $("#url")[0].value.split("/").pop(), function(data){
  14. if(!data.length){
  15. alert("Resolve Failed");
  16. return;
  17. }
  18. $("#result-table").css('display', "table");
  19. var hosts = new Set();
  20. console.log(data);
  21. data.forEach(function(downuri){
  22. var host = downuri["uri"].split("/")[2];
  23. hosts.add(host);
  24. $("#result").append("<tr><td>" + downuri["resolution"] + '</td><td><a href="' + downuri["uri"] + '">Download</a></td><td class="' + host.split(".")[0] + '">Loading...</td><td>' + host + '</td></tr>');
  25. });
  26. hosts.forEach(function(host){
  27. $.get("https://dns.mayx.eu.org/resolve?type=A&name=" + host, function(result){
  28. $("." + host.split(".")[0]).each(function(i, element){
  29. element.innerHTML = result["Answer"][0]["data"];
  30. });
  31. });
  32. });
  33. });
  34. }
  35. </script>

Powered by TurnKey Linux.