1"use strict";(self.webpackChunkhermes_agent_cn=self.webpackChunkhermes_agent_cn||[]).push([[21079],{35478:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>d});var t=s(58101);const i={},l=t.createContext(i);function r(e){const n=t.useContext(l);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(l.Provider,{value:n},e.children)}},48634:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>u,frontMatter:()=>r,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"user-guide/skills/bundled/media/media-youtube-content","title":"YouTube \u5185\u5bb9","description":"\u83b7\u53d6 YouTube \u89c6\u9891\u5b57\u5e55\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u7ed3\u6784\u5316\u5185\u5bb9\uff08\u7ae0\u8282\u3001\u6458\u8981\u3001\u4e3b\u9898\u4e32\u3001\u535a\u5ba2\u6587\u7ae0\uff09","source":"@site/docs/user-guide/skills/bundled/media/media-youtube-content.md","sourceDirName":"user-guide/skills/bundled/media","slug":"/user-guide/skills/bundled/media/media-youtube-content","permalink":"/docs/user-guide/skills/bundled/media/media-youtube-content","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"YouTube \u5185\u5bb9","sidebar_label":"YouTube \u5185\u5bb9","description":"\u83b7\u53d6 YouTube \u89c6\u9891\u5b57\u5e55\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u7ed3\u6784\u5316\u5185\u5bb9\uff08\u7ae0\u8282\u3001\u6458\u8981\u3001\u4e3b\u9898\u4e32\u3001\u535a\u5ba2\u6587\u7ae0\uff09","translationStatus":"translated","upstreamPath":"website/docs/user-guide/skills/bundled/media/media-youtube-content.md","upstreamSha":"e94c755c982e043413560adbf821b4a1740633d7","sourceUrl":"https://github.com/NousResearch/hermes-agent/blob/main/website/docs/user-guide/skills/bundled/media/media-youtube-content.md","translatedAt":"2026-05-03T17:24:02.992Z","translationModel":"qwen3.6-plus"},"sidebar":"docs","previous":{"title":"Songsee","permalink":"/docs/user-guide/skills/bundled/media/media-songsee"},"next":{"title":"Audiocraft \u97f3\u9891\u751f\u6210","permalink":"/docs/user-guide/skills/bundled/mlops/mlops-models-audiocraft"}}');var i=s(25105),l=s(35478);const r={title:"YouTube \u5185\u5bb9",sidebar_label:"YouTube \u5185\u5bb9",description:"\u83b7\u53d6 YouTube \u89c6\u9891\u5b57\u5e55\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u7ed3\u6784\u5316\u5185\u5bb9\uff08\u7ae0\u8282\u3001\u6458\u8981\u3001\u4e3b\u9898\u4e32\u3001\u535a\u5ba2\u6587\u7ae0\uff09",translationStatus:"translated",upstreamPath:"website/docs/user-guide/skills/bundled/media/media-youtube-content.md",upstreamSha:"e94c755c982e043413560adbf821b4a1740633d7",sourceUrl:"https://github.com/NousResearch/hermes-agent/blob/main/website/docs/user-guide/skills/bundled/media/media-youtube-content.md",translatedAt:new Date("2026-05-03T17:24:02.992Z"),translationModel:"qwen3.6-plus"},d="YouTube \u5185\u5bb9 {#youtube-content}",o={},c=[{value:"\u6280\u80fd\u5143\u6570\u636e",id:"skill-metadata",level:2},{value:"\u53c2\u8003\uff1a\u5b8c\u6574 SKILL.md",id:"reference-full-skillmd",level:2},{value:"\u8bbe\u7f6e",id:"setup",level:2},{value:"\u8f85\u52a9\u811a\u672c",id:"helper-script",level:2},{value:"\u8f93\u51fa\u683c\u5f0f",id:"output-formats",level:2},{value:"\u793a\u4f8b \u2014 \u7ae0\u8282\u8f93\u51fa",id:"example-\u2014-chapters-output",level:3},{value:"\u5de5\u4f5c\u6d41\u7a0b",id:"workflow",level:2},{value:"\u9519\u8bef\u5904\u7406",id:"error-handling",level:2}];function a(e){const n={admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:["\n",(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"youtube-content",children:"YouTube \u5185\u5bb9"})}),"\n",(0,i.jsx)(n.p,{children:"\u83b7\u53d6 YouTube \u89c6\u9891\u5b57\u5e55\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u7ed3\u6784\u5316\u5185\u5bb9\uff08\u7ae0\u8282\u3001\u6458\u8981\u3001\u63a8\u6587\u4e32\u3001\u535a\u5ba2\u6587\u7ae0\uff09\u3002\u5f53\u7528\u6237\u5206\u4eab YouTube URL \u6216\u89c6\u9891\u94fe\u63a5\u3001\u8981\u6c42\u603b\u7ed3\u89c6\u9891\u3001\u8bf7\u6c42\u5b57\u5e55\uff0c\u6216\u5e0c\u671b\u4ece\u4efb\u4f55 YouTube \u89c6\u9891\u4e2d\u63d0\u53d6\u5e76\u91cd\u65b0\u683c\u5f0f\u5316\u5185\u5bb9\u65f6\u4f7f\u7528\u3002"}),"\n",(0,i.jsx)(n.h2,{id:"skill-metadata",children:"\u6280\u80fd\u5143\u6570\u636e"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{}),(0,i.jsx)(n.th,{})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"\u6765\u6e90"}),(0,i.jsx)(n.td,{children:"\u6346\u7ed1\uff08\u9ed8\u8ba4\u5b89\u88c5\uff09"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"\u8def\u5f84"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"skills/media/youtube-content"})})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"reference-full-skillmd",children:"\u53c2\u8003\uff1a\u5b8c\u6574 SKILL.md"}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsx)(n.p,{children:"\u4ee5\u4e0b\u662f Hermes \u5728\u89e6\u53d1\u6b64\u6280\u80fd\u65f6\u52a0\u8f7d\u7684\u5b8c\u6574\u6280\u80fd\u5b9a\u4e49\u3002\u8fd9\u662f\u6280\u80fd\u6fc0\u6d3b\u65f6\u4ee3\u74
106\u770b\u5230\u7684\u6307\u4ee4\u3002"})}),"\n",(0,i.jsx)(n.h1,{id:"youtube-content-tool",children:"YouTube \u5185\u5bb9\u5de5\u5177"}),"\n",(0,i.jsx)(n.p,{children:"\u4ece YouTube \u89c6\u9891\u4e2d\u63d0\u53d6\u5b57\u5e55\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u6709\u7528\u7684\u683c\u5f0f\u3002"}),"\n",(0,i.jsx)(n.h2,{id:"setup",children:"\u8bbe\u7f6e"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"pip install youtube-transcript-api\n"})}),"\n",(0,i.jsx)(n.h2,{id:"helper-script",children:"\u8f85\u52a9\u811a\u672c"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"SKILL_DIR"})," \u662f\u5305\u542b\u6b64 SKILL.md \u6587\u4ef6\u7684\u76ee\u5f55\u3002\u8be5\u811a\u672c\u63a5\u53d7\u4efb\u4f55\u6807\u51c6 YouTube URL \u683c\u5f0f\u3001\u77ed\u94fe\u63a5 (youtu.be)\u3001Shorts\u3001\u5d4c\u5165\u94fe\u63a5\u3001\u76f4\u64ad\u94fe\u63a5\u6216\u539f\u59cb\u7684 11 \u5b57\u7b26\u89c6\u9891 ID\u3002"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'# JSON output with metadata\npython3 SKILL_DIR/scripts/fetch_transcript.py "https://youtube.com/watch?v=VIDEO_ID"\n\n# Plain text (good for piping into further processing)\npython3 SKILL_DIR/scripts/fetch_transcript.py "URL" --text-only\n\n# With timestamps\npython3 SKILL_DIR/scripts/fetch_transcript.py "URL" --timestamps\n\n# Specific language with fallback chain\npython3 SKILL_DIR/scripts/fetch_transcript.py "URL" --language tr,en\n'})}),"\n",(0,i.jsx)(n.h2,{id:"output-formats",children:"\u8f93\u51fa\u683c\u5f0f"}),"\n",(0,i.jsx)(n.p,{children:"\u83b7\u53d6\u5b57\u5e55\u540e\uff0c\u6839\u636e\u7528\u6237\u7684\u8981\u6c42\u8fdb\u884c\u683c\u5f0f\u5316\uff1a"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"\u7ae0\u8282"}),"\uff1a\u6309\u4e3b\u9898\u8f6c\u6362\u5206\u7ec4\uff0c\u8f93\u51fa\u5e26\u65f6\u95f4\u6233\u7684\u7ae0\u8282\u5217\u8868"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"\u6458\u8981"}),"\uff1a\u6574\u4e2a\u89c6\u9891\u7684\u7b80\u660e\u6982\u8ff0\uff0c5-10 \u53e5\u8bdd"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"\u7ae0\u8282\u6458\u8981"}),"\uff1a\u6bcf\u4e2a\u7ae0\u8282\u9644\u5e26\u4e00\u6bb5\u7b80\u77ed\u7684\u6bb5\u843d\u6458\u8981"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"\u63a8\u6587\u4e32"}),"\uff1aTwitter/X \u63a8\u6587\u4e32\u683c\u5f0f\u2014\u2014\u7f16\u53f7\u5e16\u5b50\uff0c\u6bcf\u6761\u5c11\u4e8e 280 \u4e2a\u5b57\u7b26"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"\u535a\u5ba2\u6587\u7ae0"}),"\uff1a\u5305\u542b\u6807\u9898\u3001\u7ae0\u8282\u548c\u5173\u952e\u8981\u70b9\u7684\u5168\u7bc7\u6587\u7ae0"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"\u5f15\u7528"}),"\uff1a\u5e26\u65f6\u95f4\u6233\u7684\u8457\u540d\u5f15\u8a00"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"example-\u2014-chapters-output",children:"\u793a\u4f8b \u2014 \u7ae0\u8282\u8f93\u51fa"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"00:00 Introduction \u2014 host opens with the problem statement\n03:45 Background \u2014 prior work and why existing solutions fall short\n12:20 Core method \u2014 walkthrough of the proposed approach\n24:10 Results \u2014 benchmark comparisons and key takeaways\n31:55 Q&A \u2014 audience questions on scalability and next steps\n"})}),"\n",(0,i.jsx)(n.h2,{id:"workflow",children:"\u5de5\u4f5c\u6d41\u7a0b"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"\u83b7\u53d6"}),"\uff1a\u4f7f\u7528\u8f85\u52a9\u811a\u672c\u53ca ",(0,i.jsx)(n.code,{children:"--text-only --timestamps"})," \u53c2\u6570\u83b7\u53d6\u5b57\u5e55\u3002"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"\u9a8c\u8bc1"}),"\uff1a\u786e\u8ba4\u8f93\u51fa\u975e\u7a7a\u4e14\u4e3a\u9884\u671f\u8bed\u8a00\u3002\u5982\u679c\u4e3a\u7a7a\uff0c\u8bf7\u91cd\u8bd5\u65f6\u4e0d\u5e26 ",(0,i.jsx)(n.code,{children:"--language"})," \u53c2\u6570\u4ee5\u83b7\u53d6\u4efb\u4f55\u53ef\u7528\u7684\u5b57\u5e55\u3002\u5982\u679c\u4ecd\u7136\u4e3a\u7a7a\uff0c\u544a\u77e5\u7528\u6237\u8be5\u89c6\u9891\u53ef\u80fd\u5df2\u7981\u7528\u5b57\u5e55\u3002"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"\u5206\u5757\uff08\u5982\u9700\uff09"}),"\uff1a\u5982\u679c\u5b57\u5e55\u8d85\u8fc7 ~50K \u5b57\u7b26\uff0c\u5c06\u5176\u5206\u5272\u4e3a\u91cd\u53e0\u7684\u5757\uff08~40K \u5b57\u7b26\uff0c\u91cd\u53e0 2K \u5b57\u7b26\uff09\uff0c\u5728\u5408\u5e76\u4e4b\u524d\u5bf9\u6bcf\u4e2a\u5757\u8fdb\u884c\u6458\u8981\u3002"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"\u8f6c\u6362"}),"\uff1a\u8f6c\u6362\u4e3a\u8bf7\u6c42\u7684\u8f93\u51fa\u683c\u5f0f\u3002\u5982\u679c\u7528\u6237\u672a\u6307\u5b9a\u683c\u5f0f\uff0c\u9ed8\u8ba4\u4e3a\u6458\u8981\u3002"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"\u6838\u67e5"}),"\uff1a\u5728\u5448\u73b0\u4e4b\u524d\uff0c\u91cd\u65b0\u9605\u8bfb\u8f6c\u6362\u540e\u7684\u8f93\u51fa\uff0c\u68c0\u67e5\u8fde\u8d2f\u6027\u3001\u6b63\u786e\u7684\u65f6\u95f4\u6233\u548c\u5b8c\u6574\u6027\u3002"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"error-handling",children:"\u9519\u8bef\u5904\u7406"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"\u5b57\u5e55\u5df2\u7981\u7528"}),"\uff1a\u544a\u77e5\u7528\u6237\uff1b\u5efa\u8bae\u4ed6\u4eec\u68c0\u67e5\u89c6\u9891\u9875\u9762\u4e0a\u662f\u5426\u6709\u53ef\u7528\u7684\u5b57\u5e55\u3002"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"\u89c6\u9891\u79c1\u6709/\u4e0d\u53ef\u7528"}),"\uff1a\u8f6c\u53d1\u9519\u8bef\u5e76\u8981\u6c42\u7528\u6237\u9a8c\u8bc1 URL\u3002"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"\u65e0\u5339\u914d\u8bed\u8a00"}),"\uff1a\u91cd\u8bd5\u65f6\u4e0d\u5e26 ",(0,i.jsx)(n.code,{children:"--language"})," \u53c2\u6570\u4ee5\u83b7\u53d6\u4efb\u4f55\u53ef\u7528\u7684\u5b57\u5e55\uff0c\u7136\u540e\u5411\u7528\u6237\u6ce8\u660e\u5b9e\u9645\u8bed\u8a00\u3002"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"\u7f3a\u5c11\u4f9d\u8d56\u9879"}),"\uff1a\u8fd0\u884c ",(0,i.jsx)(n.code,{children:"pip install youtube-transcript-api"})," \u5e76\u91cd\u8bd5\u3002"]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.