소스 검색

更新 iwara.html, index.html, _posts/2022-10-05-rules.md

mayx 3 년 전
부모
커밋
80a7aeaff5
3개의 변경된 파일65개의 추가작업 그리고 2개의 파일을 삭제
  1. 26 0
      _posts/2022-10-05-rules.md
  2. 4 2
      index.html
  3. 35 0
      iwara.html

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 26 - 0
_posts/2022-10-05-rules.md


+ 4 - 2
index.html

@@ -56,7 +56,9 @@ title: 首页 - 我的文章
 <p>
 <h2>其他页面</h2>
  
- <a href="https://mabbs.github.io/pixiv-index/">Pixiv图片索引API</a><br>
+ <a href="{% unless site.github %}https://mabbs.github.io{% endunless %}/pixiv-index/">Pixiv图片索引API</a><br>
+
+ <a href="/iwara.html">Iwara Download</a><br>
 
  <a href="/card.html">抽卡</a> - 由<a href="https://github.com/eeg1412/">广树</a>大佬提供卡牌<br>
 
@@ -66,7 +68,7 @@ title: 首页 - 我的文章
 
  <a href="/proxylist.html">代理列表</a><br>
 
- <a href="https://mayx.cf">Mayx日报</a><br>
+ <a href="https://mabbs.github.io/MayxDaily/">Mayx日报</a><br>
 
 <br>
 </p>

+ 35 - 0
iwara.html

@@ -0,0 +1,35 @@
+<title>Iwara Downloader</title>
+<h1>Iwara Downloader</h1>
+URL: <input type="text" id="url" /> <button onclick="resolve()">Resolve</button>
+<table id="result-table" border="1" style="display:none">
+<tr><th>Resolution</th><th>URI</th><th>IP</th><th>Host</th></tr>
+<tbody id="result"></tbody>
+</table>
+<script src="/js/jquery.min.js"></script>
+<script>
+function resolve(){
+    $("#result-table").css('display', "none");
+    $("#result").empty();
+    $.get("https://iwara.mayx.eu.org/api/video/" + $("#url")[0].value.split("/").pop(), function(data){
+        if(!data.length){
+            alert("Resolve Failed");
+            return;
+        }
+        $("#result-table").css('display', "table");
+        var hosts = new Set();
+        console.log(data);
+        data.forEach(function(downuri){
+            var host = downuri["uri"].split("/")[2];
+            hosts.add(host);
+            $("#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>');
+        });
+        hosts.forEach(function(host){
+            $.get("https://dns.mayx.eu.org/resolve?type=A&name=" + host, function(result){
+                $("." + host.split(".")[0]).each(function(i, element){
+                    element.innerHTML = result["Answer"][0]["data"];
+                });
+            });
+        });
+    });
+}
+</script>