{"version":"https://jsonfeed.org/version/1.1","title":"DBD-raws","home_page_url":"https://cms.dbdraws.dpdns.org","feed_url":"https://cms-dbdraws.pages.dev/json/","description":"<style>\n        #api-text-container {\n            font-size: 22px;\n            \n            max-width: 90%;\n            text-align: center;\n            line-height: 1.6;\n            padding: 20px;\n            border-left: 4px solid #4CAF50;\n            box-shadow: 0 2px 10px rgba(0,0,0,0.1);\n        }\n@media (max-width: 768px) {\n            #api-text-container {\n                font-size: 18px; /* 移动端减小到18px */\n                max-width: 95%; /* 移动端宽度占比更大（减少留白） */\n                padding: 15px; /* 移动端内边距减小 */\n            }\n    </style>\n<p id=\"api-text-container\"></p>\n<script>\n  // 调用文字API（以「一言」为例，返回随机句子）\n  fetch(\"https://v1.hitokoto.cn/?c=d\") // API地址（返回JSON）\n    .then(response => response.json())\n    .then(data => {\n      // 将API返回的文字填入容器（不添加任何样式，使用网站默认文本样式）\n      document.getElementById(\"api-text-container\").textContent = data.hitokoto;\n    })\n    .catch(error => {\n      // 加载失败时显示提示（同样使用默认样式）\n      document.getElementById(\"api-text-container\").textContent = \"加载失败，请稍后刷新\";\n    });\n</script>\n\n<p>这是一款轻量级的内容管理系统（CMS），可自行托管于Cloudflare平台。通过microfeed，您能够便捷地发布多种形式的内容——包括音频、视频、照片、文档、博客文章及外部链接，并以网页、RSS订阅和JSON格式输出信息流。</p>","icon":"https://cms-dbdraws.pages.dev/assets/default/channel-image.png","favicon":"https://cms-dbdraws.pages.dev/assets/default/favicon.png","authors":[{"name":"DBD制作组"}],"language":"zh-cn","items":[{"id":"4ZjvkpwoyHX","title":"api数据提取示例","url":"https://cms.dbdraws.dpdns.org/i/apitiqu-4ZjvkpwoyHX/","content_html":"<head>\n  <meta charset=\"UTF-8\">\n  <title>视频播放示例</title>\n  <!-- 1. 导入jQuery（正规CDN） -->\n  <script src=\"https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js\"></script>\n</head>\n\n\n  <!-- 2. 视频播放区域（合规内容） -->\n  <div style=\"margin: 20px;\">\n    <h3>视频播放</h3>\n    <!-- 视频标签：controls=显示控制条，muted=静音（解决自动播放限制） -->\n    <video id=\"videoPlayer\" controls  autoplay style=\"width: 100%;\n            height: auto;\n            max-height: 80vh;\n            min-height: 250px;\n            max-height: 550px;\n            display: block;\">\n      <source src=\"\" type=\"video/mp4\"> <!-- 视频源（后续通过AJAX设置） -->\n      您的浏览器不支持HTML5视频，请升级浏览器。 <!-- 不支持时的提示 -->\n    </video>\n \n    <!-- 3. 播放按钮（需用户交互，符合浏览器政策） -->\n    <button id=\"playBtn\" disabled style=\"margin-top: 10px;\">\n      加载中...（请等待视频源设置）\n    </button>\n    <!-- 4. 状态提示（用于反馈错误） -->\n    <p id=\"statusText\" style=\"color: #666;\">未发起请求...</p>\n  </div>\n\n  <!-- 5. JavaScript逻辑（整合AJAX+视频播放） -->\n  <script>\n    $(document).ready(function() {\n      // 步骤1：发起AJAX请求（获取合法视频URL）\n      $.ajax({\n        url: 'https://v2.xxapi.cn/api/meinv', // 替换为你的合法自建接口（返回视频URL）\n        type: 'GET',\n        dataType: 'json',\n        beforeSend: function() {\n          // 请求中：更新状态提示\n          $('#statusText').text('正在请求视频URL...');\n        },\n        success: function(res) {\n          // 步骤2：判断请求成功（code=200）且视频URL合法\n          if (res.code === 200 && isLegalVideoUrl(res.data)) {\n            const videoPlayer = document.getElementById('videoPlayer');\n            const playBtn = document.getElementById('playBtn');\n            \n            // 步骤3：设置视频源（res.data是合法MP4 URL）\n            videoPlayer.src = res.data;\n            $('#statusText').text('视频URL获取成功，正在加载视频...');\n            \n            // 步骤4：处理视频加载事件（加载完成后启用播放按钮）\n            videoPlayer.addEventListener('loadedmetadata', function() {\n              playBtn.disabled = false;\n              playBtn.textContent = '点击播放视频（已加载）';\n              $('#statusText').text('视频加载完成，点击按钮播放...');\n            });\n            \n            // 步骤5：处理视频播放错误（如URL无效、格式不支持）\n            videoPlayer.addEventListener('error', function(e) {\n              playBtn.disabled = true;\n              playBtn.textContent = '视频播放失败';\n              $('#statusText').text('视频播放错误：' + getVideoErrorMsg(e));\n            });\n            \n            // 步骤6：用户点击播放按钮，开始播放（需用户交互）\n            playBtn.addEventListener('click', function() {\n              videoPlayer.play(); // 调用播放方法（符合浏览器政策）\n              $('#statusText').text('视频正在播放...');\n            });\n          } else {\n            // 请求失败：更新状态提示（如code≠200或URL非法）\n            $('#statusText').text('请求失败：' + (res.msg || '视频URL非法'));\n            $('#playBtn').text('请求失败，无法播放');\n          }\n        },\n        error: function(xhr, status, error) {\n          // 步骤7：处理AJAX请求错误（如网络断开、接口不存在）\n          $('#statusText').text('AJAX请求错误：' + error);\n          $('#playBtn').text('请求错误，无法播放');\n        }\n      });\n    });\n\n    // 辅助函数1：判断是否为合法视频URL（防止非法链接）\n    function isLegalVideoUrl(url) {\n      // 校验规则：HTTP/HTTPS开头，后缀为MP4（支持大多数浏览器）\n      const regex = /^(https?:\\/\\/)[\\w.-]+[\\w/-]*\\.mp4$/i;\n      return regex.test(url);\n    }\n\n    // 辅助函数2：获取视频播放错误信息（友好提示）\n    function getVideoErrorMsg(e) {\n      switch (e.target.error.code) {\n        case e.target.error.MEDIA_ERR_ABORTED:\n          return '视频播放被中止';\n        case e.target.error.MEDIA_ERR_NETWORK:\n          return '网络错误导致视频无法加载';\n        case e.target.error.MEDIA_ERR_DECODE:\n          return '视频解码错误（格式不支持）';\n        case e.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:\n          return '视频源不支持（URL无效或格式错误）';\n        default:\n          return '未知错误';\n      }\n    }\n  </script>\n  <button onclick=\"location.reload()\" style=\"\n    width:100%;\n    height:40px;\n    background:#1a38f9;\n    color:#fff;\n    border:0;\n    border-radius:5px;\n    cursor:pointer;\n    transition:background 0.3s;\n    font-weight:600\n  \" onmouseover=\"this.style.background='#0a28e9'\" \n    onmouseout=\"this.style.background='#1a38f9'\">\n    换一个视频\n  </button>","content_text":"视频播放示例\n\n\n视频播放\n\n您的浏览器不支持HTML5视频，请升级浏览器。 加载中...（请等待视频源设置）\n\n未发起请求...\n\n换一个视频","date_published":"2025-08-06T14:28:32.877Z","_microfeed":{"web_url":"https://cms-dbdraws.pages.dev/i/api-4ZjvkpwoyHX/","json_url":"https://cms-dbdraws.pages.dev/i/4ZjvkpwoyHX/json/","rss_url":"https://cms-dbdraws.pages.dev/i/4ZjvkpwoyHX/rss/","guid":"4ZjvkpwoyHX","status":"published","itunes:episodeType":"full","date_published_short":"Wed Aug 06 2025","date_published_ms":1754490512877}}],"_microfeed":{"microfeed_version":"0.1.5","base_url":"https://cms-dbdraws.pages.dev","categories":[],"subscribe_methods":[{"name":"JSON","type":"json","url":"https://cms-dbdraws.pages.dev/json/","image":"https://cms-dbdraws.pages.dev/assets/brands/subscribe/json.png","enabled":true,"editable":false,"id":"p0wHIR3D42R"},{"name":"友情链接","type":"google podcasts","url":"https://blog.dbdraws.dpdns.org/friends","image":"https://cms-dbdraws.pages.dev/assets/brands/subscribe/google.png","enabled":true,"editable":true,"id":"BRWdIXxcFlR"}],"description_text":"这是一款轻量级的内容管理系统（CMS），可自行托管于Cloudflare平台。通过microfeed，您能够便捷地发布多种形式的内容——包括音频、视频、照片、文档、博客文章及外部链接，并以网页、RSS订阅和JSON格式输出信息流。","copyright":"Copyright © DBD制作组.2026","itunes:type":"episodic","items_sort_order":"newest_first"}}