小黄书-套图-修

https://xchina.co/photos.html

分享者: ixiaoxu_111 (3888)发布时间: 2024/12/21

挂梯使用,修复部分视频无法播放
二维码导入
{
    "articleStyle": 2,
    "customOrder": 0,
    "enableJs": false,
    "enabled": true,
    "enabledCookieJar": true,
    "header": "{\n     \"Referer\":\"https:\/\/xchina.co\",\n     \"User-Agent\":\"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/130.0.0.0 Safari\/537.36 Edg\/130.0.0.0\",\n     \"Origin\":\"https:\/\/xchina.co\"\n}",
    "lastUpdateTime": 0,
    "loadWithBaseUrl": true,
    "loginUrl": "https:\/\/xchina.co\/login.html",
    "ruleArticles": "[email protected]",
    "ruleContent": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta\n      name=\"viewport\"\n      content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0\"\n    \/>\n    <link\n      rel=\"stylesheet\"\n      href=\"https:\/\/cdn.bootcdn.net\/ajax\/libs\/viewerjs\/1.10.1\/viewer.min.css\"\n    \/>\n    <script src=\"https:\/\/cdn.bootcdn.net\/ajax\/libs\/viewerjs\/1.10.1\/viewer.min.js\"><\/script>\n    <script src=\"http:\/\/lib.sinaapp.com\/js\/jquery\/2.0.2\/jquery-2.0.2.min.js\"><\/script>\n    <script src=\"https:\/\/cdn.jsdelivr.net\/hls.js\/latest\/hls.min.js\"><\/script>\n    <script src=\"https:\/\/xchina.co\/scripts\/my_49.js\"><\/script>\n    <script src=\"https:\/\/cdn.jsdelivr.net\/npm\/hls.js@latest\"><\/script>\n    {{@@[email protected]@html}}\n  <\/head>\n\n  <body>\n    <div id=\"div_video\">\n      <div class=\"controls\">\n        <button class=\"btn prev\" go=\"-1\" disabled>上一个<\/button>\n        <div class=\"index\">\n          <span class=\"current\">1<\/span>\n          \/\n          <span class=\"total\"><\/span>\n        <\/div>\n        <button class=\"btn next\" go=\"1\">下一个<\/button>\n      <\/div>\n      <video id=\"video_player\" width=\"100%\" controls src=\"\"><\/video>\n    <\/div>\n\n    \n    <template id=\"urlData\"> {{@@[email protected]@html}} <\/template>\n    <template id=\"video_poster\"> {{@@tag.video@poster}} <\/template>\n    <script>\n      var templateContent = document.getElementById(\"urlData\").innerHTML;\n      var m3u8Url = templateContent.split(\"'\")[3];\n      var m3u8Img = templateContent.split(\"'\")[5];\n      \/\/ document.write(url + \"\\n\")\n      \/\/ document.write(img)\n      $(\"#urlData\").remove;\n      $(\"#video_poster\").remove;\n    <\/script>\n\n    <script>\n      var xhs_video = \"{{@@[email protected]@text}}\"\n\n      var xhs_type = \"{{@@[email protected]@text}}\";\n      var regType = \/V\/;\n      if (regType.test(xhs_type) || xhs_video == \"影片信息\") {\n        $(\"#div_video\").css(\"display\", \"block\");\n        \/\/ 判断是否是mp4类型视频\n        if (typeof videos !== \"undefined\") {\n          \/\/ 视频个数\n          var total = videos.length;\n          $(\".total\").text(total);\n          if (total == 1) {\n            $(\".controls\").css(\"display\", \"none\");\n          }\n          playVideo();\n          $(\".btn[go]\").click(function () {\n            if (!$(this).attr(\"disabled\")) {\n              var go = parseInt($(this).attr(\"go\"));\n              currentVideo += go;\n              currentVideo = currentVideo < 0 ? 0 : currentVideo;\n              currentVideo =\n                currentVideo > videos.length - 1\n                  ? videos.length - 1\n                  : currentVideo;\n              currentVideo == 0\n                ? $(\".btn[go='-1']\").attr(\"disabled\", \"disabled\")\n                : $(\".btn[go='-1']\").removeAttr(\"disabled\");\n              currentVideo == videos.length - 1\n                ? $(\".btn[go='1']\").attr(\"disabled\", \"disabled\")\n                : $(\".btn[go='1']\").removeAttr(\"disabled\");\n              $(\".current\").text(currentVideo + 1);\n              playVideo(true);\n            }\n          });\n          function playVideo(autoplay = false) {\n            var $player = $(\"video\");\n            var player = $player;\n            $player\n              .attr(\"poster\",\"https:\/\/xchina.co\/images\/poster.jpg\")\n              .attr(\"src\", domain + videos[currentVideo][\"url\"])\n            player.load();\n            if (autoplay) {\n              player.play();\n            }\n          }\n        } else {\n          $(\".controls\").css(\"display\", \"none\");\n\n          var $player = $(\"video\");\n          $player.attr(\"poster\", m3u8Img);\n          \/\/ 检查HLS.js是否支持当前浏览器\n          if (Hls.isSupported()) {\n            \/\/ 创建一个HLS实例\n            const hls = new Hls();\n            \/\/ 设置自定义请求头\n            hls.xhrSetup = (xhr, url) => {\n              xhr.setRequestHeader(\"Host\", \"s2.playhls.com\");\n            };\n\n            hls.loadSource(m3u8Url);\n\n            hls.attachMedia(document.getElementById(\"video_player\"));\n\n            hls.on(Hls.Events.MANIFEST_PARSED, () => {\n              document.getElementById(\"video_player\").play();\n            });\n          } else {\n            console.error(\"当前浏览器不支持HLS.js\");\n          }\n        }\n      }\n    <\/script>\n\n    {{@@[email protected]@html}}\n    <div id=\"box\">{{@@[email protected]@[email protected]@html}}<\/div>\n    <div id=\"loads\">加载中<\/div>\n    <script>\n      var loads;\n      \/\/$(document).ready(function () {\n        var box = document.getElementById(\"box\");\n        loads = document.getElementById(\"loads\");\n        new Viewer(box, { title: false, interval: 3000 });\n        var i = 1;\n        var page = \"{{@@[email protected]@textNodes##\\n}}\";\n        if (page == \"\") {\n          page = 1;\n        }\n        var baseurl = window.location.href.substring(\n          0,\n          window.location.href.lastIndexOf(\".\")\n        );\n        var urlStart = baseurl + \"\/\";\n        var urlEnd = \".html\";\n        var nurl;\n        new IntersectionObserver((entries) => {\n          if (entries[0].intersectionRatio) {\n            if (entries[0].intersectionRatio <= 0) return;\n            for (var j = 0; j < 1; j++) {\n              fetchHtml(i, page, urlStart, urlEnd);\n              i += 1;\n            }\n          }\n        }).observe(loads);\n      \/\/});\n\n      function fetchHtml(i, page, urlStart, urlEnd) {\n        if (i < page) {\n          i += 1;\n          nurl = urlStart + i + urlEnd;\n          $.ajax({\n            url: nurl,\n            dataType: \"html\",\n            success: function (html) {\n              $(\"#box\").append(\"<h5>\" + i + \"->\" + page + \"<\/h5>\");\n              $(\"#box\").append($(html).find(\"img.cr_only\"));\n              box.viewer.update();\n            },\n            error: function (xhr) {},\n          });\n        } else {\n          $(\"#loads\").html(\"\");\n        }\n      }\n    <\/script>\n  <\/body>\n<\/html>\n",
    "ruleDescription": "",
    "ruleImage": "[email protected]@tag.img@src",
    "ruleLink": "tag.a.0@href",
    "ruleNextPage": "[email protected]@href",
    "rulePubDate": "[email protected]@text",
    "ruleTitle": "[email protected]@alt",
    "singleUrl": false,
    "sortUrl": "搜索::https:\/\/xchina.co\/photos\/keyword-{{(source.getVariable()==''||source.getVariable()==null)?source.setVariable('JVID'):source.getVariable()}}\/{{page}}.html\n有视频::https:\/\/xchina.co\/photos\/album-11.html\n秀人网::https:\/\/xchina.co\/photos\/album-1.html\n大尺度主题::https:\/\/xchina.co\/photos\/album-2.html\n性爱主题::https:\/\/xchina.co\/photos\/album-3.html\n露出主题::https:\/\/xchina.co\/photos\/album-4.html\nCosplay主题::https:\/\/xchina.co\/photos\/album-5.html\n道具主题::https:\/\/xchina.co\/photos\/album-6.html\n捆绑主题::https:\/\/xchina.co\/photos\/album-7.html\n白虎主题::https:\/\/xchina.co\/photos\/album-8.html\n女同主题::https:\/\/xchina.co\/photos\/album-9.html\n丝袜主题::https:\/\/xchina.co\/photos\/album-10.html",
    "sourceComment": "挂梯使用,裸连大概率连不上。",
    "sourceIcon": "https:\/\/p3-search.byteimg.com\/obj\/labis\/0a5502af6b95a6b49d3acd488aae8398",
    "sourceName": "小黄书-套图-修",
    "sourceUrl": "https:\/\/xchina.co\/photos.html",
    "style": "img{width:100%;height:auto;margin-bottom:10px}\nh5{margin-bottom:0;padding-left:5;margin-top:-10px}\n.controls {\n        padding: 5px 0 10px;\n        text-align: center;\n        font-size: 16px;\n        color: #000;\n        line-height: 30px;\n        white-space: nowrap;\n        user-select: none;\n\n    }\n\n    .btn {\n        height: 30px;\n        line-height: 30px;\n        padding: 0 20px;\n        font-size: 14px;\n        cursor: pointer;\n        background-color: #3498db;\n        color: #fff;\n        border: none;\n        border-radius: 5px;\n        outline: none;\n        margin: 0 5px;\n        display: inline-block;\n    }\n\n    .index {\n        display: inline-block;\n        margin: 0 10px;\n        padding: 5px;\n    }\n    #div_video {\n        display: none;\nmargin-bottom:10px;\n    }"
}
广告