import{_ as e,c as r,a as t,b as s,d as a,e as o,w as p,r as c,o as d}from"./app-Dgsdh8A6.js";const D={};function i(u,n){const l=c("RouteLink");return d(),r("div",null,[n[42]||(n[42]=t(`<h1 id="投稿" tabindex="-1"><a class="header-anchor" href="#投稿"><span>投稿</span></a></h1><h2 id="上传封面" tabindex="-1"><a class="header-anchor" href="#上传封面"><span>上传封面</span></a></h2><blockquote><p>https://member.bilibili.com/x/vu/web/cover/up</p></blockquote><p><em>请求方式: POST</em></p><p>认证方式：Cookie(SESSDATA)</p><p>注: 目前看来上传的图片似乎不会自动删除</p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>ts</td><td>num</td><td>当前时间</td><td>不必要</td><td>UNIX 毫秒时间戳</td></tr></tbody></table><p><strong>正文参数(application/x-www-form-urlencoded):</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>csrf</td><td>str</td><td>CSRF Token (位于 Cookie 中 bili_jct)</td><td>必要</td><td></td></tr><tr><td>cover</td><td>base64</td><td>视频封面</td><td>必要</td><td>经过 base64 编码的图片数据</td></tr></tbody></table><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0: 成功<br>-400: 请求错误<br>-111: csrf 校验失败<br>-101: 账号未登录</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为 0</td></tr><tr><td>ttl</td><td>num</td><td>1</td><td></td></tr><tr><td>data</td><td>obj</td><td>信息本体</td><td></td></tr></tbody></table><p><code>data</code> 对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>url</td><td>str</td><td>封面 URL</td><td></td></tr></tbody></table><p><strong>示例:</strong></p><p>假设已经把需要发送的数据进行编码存放在文件 <code>./b64</code> 中:</p><div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-text"><span class="line"><span>csrf=xxxxxxxxxxxx&amp;cover=data%3Aimage%2Fjpeg%3Bbase64%2C%2F9j%2F4AAQSkZJRgABA...</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>发送请求:</p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -X</span><span style="color:#CE9178;"> POST</span><span style="color:#569CD6;"> --url</span><span style="color:#CE9178;"> &quot;https://member.bilibili.com/x/vu/web/cover/up&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;ts=$(</span><span style="color:#DCDCAA;">date</span><span style="color:#CE9178;"> +%s%3N)&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-binary </span><span style="color:#CE9178;">@b64</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&quot;SESSDATA=xxxxxx; bili_jct=xxxxxx&quot;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>JavaScript (Node.js) 请求<a href="https://gist.github.com/SessionHu/5e47a3a1a351ac5486c87e3d63930e7a" target="_blank" rel="noopener noreferrer">示例</a></p><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;url&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://archive.biliimg.com/bfs/archive/77906db03b1eefac02613de184afad03f7bc58d7.jpg&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="获取上传模板列表" tabindex="-1"><a class="header-anchor" href="#获取上传模板列表"><span>获取上传模板列表</span></a></h2><blockquote><p>https://member.bilibili.com/x/vupre/web/tpls</p></blockquote><p><em>请求方式: GET</em></p><p>认证方式：Cookie(SESSDATA)</p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>t</td><td>num</td><td>当前时间</td><td>非必要</td><td>UNIX 毫秒时间戳</td></tr></tbody></table><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0: 成功<br>其他: 失败</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为 0</td></tr><tr><td>ttl</td><td>num</td><td>1</td><td></td></tr><tr><td>data</td><td>array</td><td>模板列表</td><td></td></tr></tbody></table><p><code>data</code> 数组中的对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>tid</td><td>num</td><td>模板 ID</td><td></td></tr><tr><td>name</td><td>str</td><td>模板名称</td><td></td></tr><tr><td>typeid</td><td>num</td><td>分区 ID</td><td></td></tr><tr><td>title</td><td>str</td><td>标题</td><td></td></tr><tr><td>tags</td><td>str</td><td>标签</td><td></td></tr><tr><td>description</td><td>str</td><td>描述</td><td></td></tr><tr><td>copyright</td><td>num</td><td>版权类型</td><td>1: 自制<br>2: 转载</td></tr><tr><td>attribute</td><td>num</td><td>属性</td><td>0 或其他</td></tr><tr><td>is_default</td><td>num</td><td>是否默认</td><td>0: 否<br>1: 是</td></tr></tbody></table><p><strong>示例:</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -G</span><span style="color:#CE9178;"> &quot;https://member.bilibili.com/x/vupre/web/tpls&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&quot;SESSDATA=xxxxxxxxxxx&quot;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: [</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;tid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">12</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;直播录像&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;typeid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">173</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;title&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot; 标题&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;tags&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;可爱&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;description&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;描述&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;copyright&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;attribute&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;is_default&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">  ]</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="编辑上传模板" tabindex="-1"><a class="header-anchor" href="#编辑上传模板"><span>编辑上传模板</span></a></h2><blockquote><p>https://member.bilibili.com/x/vupre/web/tpl/update</p></blockquote><p><em>请求方式: POST</em></p><p>认证方式：Cookie(SESSDATA)</p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>t</td><td>num</td><td>当前时间</td><td>非必要</td><td>UNIX 毫秒时间戳</td></tr></tbody></table><p><strong>正文参数(application/json):</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>tid</td><td>num</td><td>模板 ID</td><td>必要</td><td></td></tr><tr><td>name</td><td>str</td><td>模板名称</td><td>非必要</td><td></td></tr><tr><td>title</td><td>str</td><td>标题</td><td>非必要</td><td></td></tr><tr><td>keywords</td><td>str</td><td>标签</td><td>非必要</td><td>多个标签用 <code>,</code> 分隔</td></tr><tr><td>description</td><td>str</td><td>描述</td><td>非必要</td><td></td></tr><tr><td>typeid</td><td>num</td><td>分区 ID</td><td>非必要</td><td></td></tr><tr><td>arctype</td><td>str</td><td>版权类型</td><td>非必要</td><td>&quot;Original&quot;: 自制<br>&quot;Copy&quot;: 转载</td></tr><tr><td>is_default</td><td>num</td><td>是否默认</td><td>非必要</td><td>0: 否<br>1: 是</td></tr><tr><td>csrf</td><td>str</td><td>CSRF Token (位于 Cookie 中 bili_jct)</td><td>必要</td><td></td></tr></tbody></table><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0: 成功<br>其他: 失败</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为 0</td></tr><tr><td>ttl</td><td>num</td><td>1</td><td></td></tr></tbody></table><p><strong>示例:</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -X</span><span style="color:#CE9178;"> POST</span><span style="color:#CE9178;"> &quot;https://member.bilibili.com/x/vupre/web/tpl/update&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;t=$(</span><span style="color:#DCDCAA;">date</span><span style="color:#CE9178;"> +%s%3N)&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-H </span><span style="color:#CE9178;">&quot;Content-Type: application/json&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data </span><span style="color:#CE9178;">&#39;{</span></span>
<span class="line"><span style="color:#CE9178;">  &quot;tid&quot;: 12,</span></span>
<span class="line"><span style="color:#CE9178;">  &quot;name&quot;: &quot;新模板名称&quot;,</span></span>
<span class="line"><span style="color:#CE9178;">  &quot;title&quot;: &quot;新标题&quot;,</span></span>
<span class="line"><span style="color:#CE9178;">  &quot;keywords&quot;: &quot;标签1,标签2&quot;,</span></span>
<span class="line"><span style="color:#CE9178;">  &quot;description&quot;: &quot;新描述&quot;,</span></span>
<span class="line"><span style="color:#CE9178;">  &quot;typeid&quot;: 173,</span></span>
<span class="line"><span style="color:#CE9178;">  &quot;arctype&quot;: &quot;Original&quot;,</span></span>
<span class="line"><span style="color:#CE9178;">  &quot;is_default&quot;: 1,</span></span>
<span class="line"><span style="color:#CE9178;">  &quot;csrf&quot;: &quot;xxxxxxxxxxxx&quot;</span></span>
<span class="line"><span style="color:#CE9178;">}&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&quot;SESSDATA=xxxxxxxxxxx&quot;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="查询话题" tabindex="-1"><a class="header-anchor" href="#查询话题"><span>查询话题</span></a></h2><blockquote><p>https://member.bilibili.com/x/vupre/web/topic/type</p></blockquote><p><em>请求方式: GET</em></p><p>认证方式：Cookie(SESSDATA)</p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>type_id</td><td>num</td><td>分区 ID</td><td>非必要</td><td></td></tr><tr><td>pn</td><td>num</td><td>页码</td><td>必要</td><td>从 0 开始</td></tr><tr><td>ps</td><td>num</td><td>每页个数</td><td>必要</td><td></td></tr><tr><td>title</td><td>str</td><td>视频标题</td><td>非必要</td><td></td></tr><tr><td>t</td><td>num</td><td>当前时间</td><td>非必要</td><td>UNIX 毫秒时间戳</td></tr></tbody></table><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0: 成功<br>其他: 失败</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为 0</td></tr><tr><td>ttl</td><td>num</td><td>1</td><td></td></tr><tr><td>data</td><td>array</td><td>话题列表</td><td></td></tr></tbody></table><p><code>data</code> 数组中的对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>topic_id</td><td>num</td><td>话题 ID</td><td></td></tr><tr><td>topic_name</td><td>str</td><td>话题名称</td><td></td></tr><tr><td>description</td><td>str</td><td>话题描述</td><td></td></tr><tr><td>mission_id</td><td>num</td><td>任务 ID</td><td></td></tr><tr><td>activity_text</td><td>str</td><td>活动文本</td><td></td></tr><tr><td>activity_description</td><td>str</td><td>活动描述</td><td></td></tr></tbody></table><p><strong>示例:</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -G</span><span style="color:#CE9178;"> &quot;https://member.bilibili.com/x/vupre/web/topic/type&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&quot;pn=0&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&quot;ps=20&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&quot;SESSDATA=xxxxxxxxxxx&quot;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;topics&quot;</span><span style="color:#D4D4D4;">: [</span></span>
<span class="line"><span style="color:#D4D4D4;">        {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;topic_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1245317</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;topic_name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;疯狂打游戏&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;description&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;疯狂于游戏的世界吧！愿你在这场虚拟的战斗中展现出你非凡的智慧与勇气，让每一个夜晚都充满了激情与荣耀！&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;mission_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1742462</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;activity_text&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;有奖活动&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;activity_description&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;@神魂の魇 发起&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">        }</span></span>
<span class="line"><span style="color:#D4D4D4;">    ],</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;tags&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">null</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;maxpage&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">200</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;request_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;123&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="话题搜索" tabindex="-1"><a class="header-anchor" href="#话题搜索"><span>话题搜索</span></a></h2><blockquote><p>https://member.bilibili.com/x/vupre/web/topic/search</p></blockquote><p><em>请求方式: GET</em></p><p>认证方式：Cookie(SESSDATA)</p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>page_size</td><td>num</td><td>每页个数</td><td>非必要</td><td></td></tr><tr><td>offset</td><td>num</td><td>个数偏移</td><td>非必要</td><td>并非页数</td></tr><tr><td>keywords</td><td>str</td><td>关键字</td><td>非必要</td><td></td></tr><tr><td>t</td><td>num</td><td>当前时间</td><td>非必要</td><td>UNIX 毫秒时间戳</td></tr></tbody></table><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0: 成功<br>其他: 失败</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为 0</td></tr><tr><td>ttl</td><td>num</td><td>1</td><td></td></tr><tr><td>data</td><td>obj</td><td>信息本体</td><td></td></tr></tbody></table><p><code>data</code> 对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>result</td><td>obj</td><td>搜索结果</td><td></td></tr></tbody></table><p><code>result</code> 对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>has_create_jurisdiction</td><td>bool</td><td>？</td><td></td></tr><tr><td>is_new_topic</td><td>bool</td><td>是否为新话题？</td><td></td></tr><tr><td>tips</td><td>str</td><td>提示信息</td><td></td></tr><tr><td>page_info</td><td>obj</td><td>分页信息</td><td></td></tr><tr><td>topics</td><td>array</td><td>话题列表</td><td></td></tr></tbody></table><p><code>page_info</code> 对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>has_more</td><td>bool</td><td>是否有更多</td><td></td></tr><tr><td>offset</td><td>num</td><td>偏移量</td><td></td></tr><tr><td>page_number</td><td>num</td><td>页码</td><td></td></tr></tbody></table><p><code>topics</code>数组中的对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>act_protocol</td><td>str</td><td>？</td><td></td></tr><tr><td>activity_sign</td><td>str</td><td>？</td><td></td></tr><tr><td>description</td><td>str</td><td>话题描述</td><td></td></tr><tr><td>id</td><td>num</td><td>话题 ID</td><td></td></tr><tr><td>mission_id</td><td>num</td><td>任务 ID</td><td></td></tr><tr><td>name</td><td>str</td><td>话题名称</td><td></td></tr><tr><td>state</td><td>num</td><td>状态？</td><td></td></tr><tr><td>uname</td><td>str</td><td>？</td><td></td></tr></tbody></table><p><strong>示例:</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -G</span><span style="color:#CE9178;"> &quot;https://member.bilibili.com/x/vupre/web/topic/search&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&quot;page_size=20&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&quot;offset=0&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&quot;keywords=example&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&quot;SESSDATA=xxxxxxxxxxx&quot;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;result&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;topics&quot;</span><span style="color:#D4D4D4;">: [</span></span>
<span class="line"><span style="color:#D4D4D4;">          {</span></span>
<span class="line"><span style="color:#9CDCFE;">            &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1200265</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">            &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;巴黎最前线&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">            &quot;uname&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">            &quot;state&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">            &quot;description&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;巴黎体育盛会前线速递！&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">            &quot;mission_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">            &quot;activity_sign&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">            &quot;act_protocol&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">          }</span></span>
<span class="line"><span style="color:#D4D4D4;">      ],</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;page_info&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;page_num&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;offset&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;has_more&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">true</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;is_new_topic&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">false</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;has_create_jurisdiction&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">true</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;tips&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;该话题是UP主活动相关话题，您在话题下的稿件信息可能会被提供给发起话题的UP主，并可能被UP主用于二次创作&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="标签可用性检查" tabindex="-1"><a class="header-anchor" href="#标签可用性检查"><span>标签可用性检查</span></a></h2><blockquote><p>https://member.bilibili.com/x/vupre/web/topic/tag/check</p></blockquote><p><em>请求方式: GET</em></p><p>认证方式：Cookie(SESSDATA)</p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>tag</td><td>str</td><td>需要检查的标签</td><td>必要</td><td></td></tr></tbody></table><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0: 成功<br>其他: 失败</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为 0</td></tr><tr><td>ttl</td><td>num</td><td>1</td><td></td></tr><tr><td>data</td><td>obj</td><td>信息本体</td><td></td></tr></tbody></table><p><code>data</code> 对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>标签状态</td><td>0: 可用<br>其他: 不可用</td></tr><tr><td>content</td><td>str</td><td>错误返回</td><td></td></tr></tbody></table><p><strong>示例:</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -G</span><span style="color:#CE9178;"> &quot;https://member.bilibili.com/x/vupre/web/topic/tag/check&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&quot;tag=example_tag&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&quot;SESSDATA=xxxxxxxxxxx&quot;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;content&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">16025</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;tag已经被封印了~&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;content&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;服务器错误&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="获取简介相关信息" tabindex="-1"><a class="header-anchor" href="#获取简介相关信息"><span>获取简介相关信息</span></a></h2><blockquote><p>https://member.bilibili.com/x/vupre/web/archive/desc/format</p></blockquote><p><em>请求方式: GET</em></p><p>认证方式：Cookie(SESSDATA)</p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>typeid</td><td>num</td><td>分区 ID</td><td>必要</td><td></td></tr><tr><td>copyright</td><td>num</td><td>版权类型</td><td>必要</td><td>1：自制<br>2：转载</td></tr><tr><td>t</td><td>num</td><td>当前时间</td><td>非必要</td><td>UNIX 毫秒时间戳</td></tr></tbody></table><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0: 成功<br>其他: 失败</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为 0</td></tr><tr><td>ttl</td><td>num</td><td>1</td><td></td></tr><tr><td>data</td><td>obj</td><td>null</td><td>信息本体</td></tr></tbody></table><p>注：某个时间点后，没有发现 data 为 null 的情况了，过去为 null 时简介上限250字</p><p><code>data</code> 对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>typeid</td><td>num</td><td>分区 ID</td><td></td></tr><tr><td>id</td><td>num</td><td>ID</td><td></td></tr><tr><td>lang</td><td>num</td><td>未知</td><td></td></tr><tr><td>copyright</td><td>num</td><td>版权类型</td><td>1：自制<br>2：转载</td></tr><tr><td>components</td><td>str</td><td>简介输入框提示文字</td><td>JSON 字符串</td></tr></tbody></table><p><code>components</code> 示例： <code>&#39;[{&quot;name&quot;:&quot;相关游戏&quot;,&quot;index&quot;:1,&quot;type&quot;:&quot;text&quot;,&quot;required&quot;:&quot;1&quot;,&quot;box&quot;:&quot;请输入本视频所涉及的游戏名称，以顿号分隔，例：英雄联盟、塞尔达传说、刺客信条&quot;},{&quot;name&quot;:&quot;简介补充&quot;,&quot;index&quot;:2,&quot;type&quot;:&quot;textarea&quot;,&quot;required&quot;:&quot;1&quot;,&quot;box&quot;:&quot;&quot;}]&#39;</code></p><p><strong>示例:</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -G</span><span style="color:#CE9178;"> &quot;https://member.bilibili.com/x/vupre/web/archive/desc/format&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&quot;typeid=65&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&quot;copyright=1&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&quot;SESSDATA=xxxxxxxxxxx&quot;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;typeid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">65</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;lang&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;copyright&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;components&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;[{</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">name</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">:</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">相关游戏</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">,</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">index</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">:1,</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">type</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">:</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">text</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">,</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">required</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">:</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">1</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">,</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">box</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">:</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">请输入本视频所涉及的游戏名称，以顿号分隔，例：英雄联盟、塞尔达传说、刺客信条</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">},{</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">name</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">:</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">简介补充</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">,</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">index</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">:2,</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">type</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">:</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">textarea</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">,</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">required</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">:</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">1</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">,</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">box</span><span style="color:#D7BA7D;">\\&quot;</span><span style="color:#CE9178;">:</span><span style="color:#D7BA7D;">\\&quot;\\&quot;</span><span style="color:#CE9178;">}]&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="获取上传线路" tabindex="-1"><a class="header-anchor" href="#获取上传线路"><span>获取上传线路</span></a></h2><blockquote><p>https://member.bilibili.com/preupload?r=probe</p></blockquote><p><em>请求方式: GET</em></p><p>认证方式：无</p><p><strong>URL参数:</strong></p><p>无</p><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>OK</td><td>num</td><td>返回值</td><td>1: 成功<br>其他: 失败</td></tr><tr><td>lines</td><td>array</td><td>上传线路列表</td><td></td></tr><tr><td>probe</td><td>obj</td><td>未知</td><td></td></tr></tbody></table><p>probe 中的对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>post</td><td>float</td><td>未知</td><td>固定0.1</td></tr></tbody></table><p>lines 数组中的对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>os</td><td>str</td><td>操作系统</td><td></td></tr><tr><td>query</td><td>str</td><td>查询参数</td><td></td></tr><tr><td>probe_url</td><td>str</td><td>探测 URL</td><td></td></tr></tbody></table><p><strong>示例:</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -G</span><span style="color:#CE9178;"> &quot;https://member.bilibili.com/preupload?r=probe&quot;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;OK&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;lines&quot;</span><span style="color:#D4D4D4;">: [</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;os&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;upos&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;query&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;probe_version=20221109&amp;upcdn=tx&amp;zone=cs&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;probe_url&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;//upos-cs-upcdntx.bilivideo.com/OK&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;os&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;upos&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;query&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;probe_version=20221109&amp;upcdn=bldsa&amp;zone=cs&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;probe_url&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;//upos-cs-upcdnbldsa.bilivideo.com/OK&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;os&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;upos&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;query&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;probe_version=20221109&amp;upcdn=bda2&amp;zone=cs&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;probe_url&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;//upos-cs-upcdnbda2.bilivideo.com/OK&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      }</span></span>
<span class="line"><span style="color:#D4D4D4;">  ],</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;probe&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;post&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0.1</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="预测稿件类型" tabindex="-1"><a class="header-anchor" href="#预测稿件类型"><span>预测稿件类型</span></a></h2><blockquote><p>https://member.bilibili.com/x/vupre/web/archive/types/predict</p></blockquote><p><em>请求方式: POST</em></p><p>认证方式: Cookie(SESSDATA)</p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>ts</td><td>num</td><td>当前时间</td><td>不必要</td><td>UNIX 毫秒时间戳</td></tr><tr><td>csrf</td><td>str</td><td>CSRF Token (位于 Cookie 中 bili_jct)</td><td>必要</td><td></td></tr></tbody></table><p><strong>正文参数(multipart/form-data):</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>filename</td><td>str</td><td>视频文件名</td><td>必要</td><td>从视频上传接口获取, 无后缀名, 可为空</td></tr><tr><td>title</td><td>str</td><td>视频标题</td><td>不必要</td><td></td></tr><tr><td>upload_id</td><td>str</td><td>上传 ID</td><td>不必要</td><td>如 <code>616368979_1723455540876_8794</code></td></tr></tbody></table><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0: 成功<br>-400: 请求错误<br>-111: csrf 校验失败<br>-101: 账号未登录</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为 0</td></tr><tr><td>ttl</td><td>num</td><td>1</td><td></td></tr><tr><td>data</td><td>array</td><td>信息本体</td><td></td></tr></tbody></table><p><code>data</code> 数组:</p><table><thead><tr><th>项</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>0</td><td>obj</td><td>视频类型 1</td><td></td></tr><tr><td>1</td><td>obj</td><td>视频类型 2</td><td></td></tr><tr><td>……</td><td>obj</td><td>……</td><td></td></tr><tr><td>n</td><td>obj</td><td>视频类型 (n+1)</td><td></td></tr></tbody></table><p><code>data</code> 数组中的对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>num</td><td>子分区 ID</td><td></td></tr><tr><td>parent</td><td>num</td><td>总分区 ID</td><td></td></tr><tr><td>parent_name</td><td>str</td><td>总分区名称</td><td></td></tr><tr><td>name</td><td>str</td><td>子分区名称</td><td></td></tr><tr><td>description</td><td>str</td><td>子分区描述</td><td></td></tr><tr><td>desc</td><td>str</td><td>子分区描述</td><td>同 <code>description</code></td></tr><tr><td>intro_original</td><td>str</td><td>原创简介说明</td><td></td></tr><tr><td>intro_copy</td><td>str</td><td>转载简介说明</td><td></td></tr><tr><td>notice</td><td>str</td><td>注意事项</td><td></td></tr><tr><td>copy_right</td><td>num</td><td>版权信息?</td><td>0</td></tr><tr><td>show</td><td>bool</td><td>是否显示?</td><td>true</td></tr><tr><td>rank</td><td>num</td><td>排序权重?</td><td></td></tr><tr><td>max_video_count</td><td>num</td><td>最大视频数量?</td><td></td></tr><tr><td>request_id</td><td>str</td><td>空</td><td></td></tr><tr><td>human_type</td><td>obj|null</td><td>新分区ID，好像除第一个之外都是null</td><td></td></tr></tbody></table><p><code>human_type</code> 参数</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>num</td><td>新分区id</td><td>可在 <a href="#%E8%8E%B7%E5%8F%96%E6%96%B0%E5%88%86%E5%8C%BAID">获取新分区ID</a> 找到对应名称</td></tr></tbody></table><p><strong>示例:</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -X</span><span style="color:#CE9178;"> POST</span><span style="color:#569CD6;"> --url</span><span style="color:#CE9178;"> &#39;https://member.bilibili.com/x/vupre/web/archive/types/predict&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&#39;csrf=d51eadf05ba3bc6c5f76def7fbcc0185&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&#39;filename=&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&#39;SESSDATA=xxx; bili_jct=xxx&#39;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: [</span></span>
<span class="line"><span style="color:#D4D4D4;">    {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">122</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;parent&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">36</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;parent_name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;知识&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;野生技能协会&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;description&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;技能展示或技能教学分享类视频&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;desc&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;技能展示或技能教学分享类视频&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;intro_original&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;可对视频内容进行补充说明，并对所使用的视频素材进行标明。</span><span style="color:#D7BA7D;">\\n</span><span style="color:#CE9178;">如是系列，也可附带上期视频地址。</span><span style="color:#D7BA7D;">\\n</span><span style="color:#CE9178;">请勿加入涉政或具较大争议性的文字简介，否则将做打回处理。&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;intro_copy&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;转载稿件需标明出处，请注明原作者、原作者频道名或原作者投稿地址。</span><span style="color:#D7BA7D;">\\n</span><span style="color:#CE9178;">可对相关内容进行补充说明。</span><span style="color:#D7BA7D;">\\n</span><span style="color:#CE9178;">请勿加入涉政或具较大争议性的文字简介，否则将做打回处理。</span><span style="color:#D7BA7D;">\\n</span><span style="color:#CE9178;">如是系列，也可附带上期视频地址。&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;notice&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;清晰明了表明内容亮点的标题会更受观众欢迎哟！&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;copy_right&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;show&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">true</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;rank&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">75</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;max_video_count&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">100</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;request_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">    },</span></span>
<span class="line"><span style="color:#D4D4D4;">    {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">21</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;parent&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">160</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;parent_name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;生活&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;日常&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;description&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;一般日常向的生活类视频&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;desc&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;一般日常向的生活类视频&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;intro_original&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;能够选择自制的必须是up主个人或工作室自己制作剪辑的视频，除此之外的搬运视频字幕制作，对于视频进行加速、慢放等简易二次创作，在视频中添加前后贴片或者打水印等行为均不被认作自制&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;intro_copy&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;转载需写明请注明转载作品详细信息原作者、原标题及出处（需为该视频最原始出处，如所标注明显为非原始出处的话会被打回）&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;notice&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;copy_right&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;show&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">true</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;rank&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">4</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;max_video_count&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">50</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;request_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">    },</span></span>
<span class="line"><span style="color:#D4D4D4;">    {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">242</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;parent&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">5</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;parent_name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;娱乐&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;娱乐粉丝创作&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;description&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;粉丝向创作视频&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;desc&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;粉丝向创作视频&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;intro_original&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;intro_copy&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;notice&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;清晰明了表明内容亮点的标题会更受观众欢迎哟！&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;copy_right&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;show&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">true</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;rank&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">40</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;max_video_count&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">50</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;request_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">    },</span></span>
<span class="line"><span style="color:#D4D4D4;">    {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">65</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;parent&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">4</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;parent_name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;游戏&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;网络游戏&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;description&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;多人在线游戏为主要内容的相关视频&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;desc&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;多人在线游戏为主要内容的相关视频&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;intro_original&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;建议在简介和TAG中添加正确的游戏名，以便在分区和搜索中得到更好的展示。</span><span style="color:#D7BA7D;">\\n</span><span style="color:#CE9178;">录制他人直播（包括授权转载、授权录制）不属于自制内容，请选转载。&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;intro_copy&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;建议在简介和TAG中添加正确的游戏名。</span><span style="color:#D7BA7D;">\\n</span><span style="color:#CE9178;">搬运转载内容请添加原作者、原链接地址信息。录制他人直播内容请添加原主播信息、直播时间。</span><span style="color:#D7BA7D;">\\n</span><span style="color:#CE9178;">未添加正确转载、录播信息的稿件可能被打回。&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;notice&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;【UP主/节目名】+《游戏名》+主要标题+期号&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;copy_right&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;show&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">true</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;rank&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">30</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;max_video_count&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">50</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;request_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">    },</span></span>
<span class="line"><span style="color:#D4D4D4;">    {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">138</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;parent&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">160</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;parent_name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;生活&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;搞笑&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;description&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;搞笑挑战、剪辑、表演、配音以及各类日常沙雕视频&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;desc&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;搞笑挑战、剪辑、表演、配音以及各类日常沙雕视频&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;intro_original&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;能够选择自制的必须是up主个人或工作室自己制作剪辑的视频，除此之外的搬运视频字幕制作，对于视频进行加速、慢放等简易二次创作，在视频中添加前后贴片或者打水印等行为均不被认作自制&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;intro_copy&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;转载需写明请注明转载作品详细信息原作者、原标题及出处（需为该视频最原始出处，如所标注明显为非原始出处的话会被打回）&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;notice&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;copy_right&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;show&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">true</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;rank&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">30</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;max_video_count&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">50</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;request_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#D4D4D4;">  ]</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="预测稿件标签" tabindex="-1"><a class="header-anchor" href="#预测稿件标签"><span>预测稿件标签</span></a></h2><blockquote><p>https://member.bilibili.com/x/vupre/web/tag/recommend</p></blockquote><p><em>请求方式: GET</em></p><p>认证方式: Cookie(SESSDATA)</p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>upload_id</td><td>str</td><td>同 <a href="#%E9%A2%84%E6%B5%8B%E7%A8%BF%E4%BB%B6%E7%B1%BB%E5%9E%8B">预测稿件类型</a> 的 <code>upload_id</code></td><td>不必要</td><td></td></tr><tr><td>subtype_id</td><td>int</td><td>子分区 ID</td><td>不必要</td><td></td></tr><tr><td>title</td><td>str</td><td>视频标题</td><td>不必要</td><td></td></tr><tr><td>filename</td><td>str</td><td>同 <a href="#%E9%A2%84%E6%B5%8B%E7%A8%BF%E4%BB%B6%E7%B1%BB%E5%9E%8B">预测稿件类型</a> 的 <code>filename</code></td><td>不必要</td><td></td></tr><tr><td>description</td><td>str</td><td>视频简介</td><td>不必要</td><td></td></tr><tr><td>cover_url</td><td>str</td><td>视频封面 URL</td><td>不必要</td><td>不含 <code>https:</code> 或 <code>http:</code> 字串</td></tr><tr><td>t</td><td>int</td><td>当前 UNIX 毫秒时间戳</td><td>不必要</td><td></td></tr></tbody></table><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>int</td><td>返回值</td><td>0: 成功<br>-101: 账号未登录</td></tr><tr><td>data</td><td>array</td><td>标签信息</td><td></td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为 0</td></tr><tr><td>request_id</td><td>str</td><td>请求 ID</td><td></td></tr></tbody></table><p><code>data</code> 数组:</p><table><thead><tr><th>项</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>0</td><td>obj</td><td>标签 1</td><td></td></tr><tr><td>1</td><td>obj</td><td>标签 2</td><td></td></tr><tr><td>……</td><td>obj</td><td>……</td><td></td></tr><tr><td>n</td><td>obj</td><td>标签 (n+1)</td><td></td></tr></tbody></table><p><code>data</code> 数组中的对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>tag</td><td>str</td><td>标签名称</td><td></td></tr><tr><td>checked</td><td>int</td><td>0</td><td></td></tr><tr><td>request_id</td><td>str</td><td>请求 ID</td><td>同根对象</td></tr></tbody></table><p><strong>示例:</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -G</span><span style="color:#CE9178;"> &#39;https://member.bilibili.com/x/vupre/web/tag/recommend&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&#39;subtype_id=122&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&#39;title=Telnet手打HTTP&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&#39;description=测试用 Telnet 手打 HTTP/1.x 协议访问本地服务器, 无 SSL/TLS 支持&#39;</span></span>
<span class="line"><span style="color:#DCDCAA;">-b</span><span style="color:#CE9178;"> &#39;SESSDATA=xxx&#39;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: [</span></span>
<span class="line"><span style="color:#D4D4D4;">    {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;tag&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;学习&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;checked&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;request_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;TAG_1723543336295_3371&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">    },</span></span>
<span class="line"><span style="color:#D4D4D4;">    {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;tag&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;编程&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;checked&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;request_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">    },</span></span>
<span class="line"><span style="color:#D4D4D4;">    {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;tag&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;课程&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;checked&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;request_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">    },</span></span>
<span class="line"><span style="color:#D4D4D4;">    {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;tag&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;学习心得&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;checked&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;request_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">    },</span></span>
<span class="line"><span style="color:#D4D4D4;">    {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;tag&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;经验分享&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;checked&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;request_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#D4D4D4;">  ],</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;request_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;TAG_1723543336295_3371&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="投递视频稿件-web" tabindex="-1"><a class="header-anchor" href="#投递视频稿件-web"><span>投递视频稿件（Web）</span></a></h2><blockquote><p>https://member.bilibili.com/x/vu/web/add/v3</p></blockquote><p><em>请求方式: POST</em></p><p>认证方式：Cookie(SESSDATA)</p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>ts</td><td>num</td><td>当前时间</td><td>不必要</td><td>UNIX 毫秒时间戳</td></tr><tr><td>csrf</td><td>str</td><td>CSRF Token (位于 Cookie 中 bili_jct)</td><td>必要</td><td></td></tr></tbody></table><p><strong>正文参数(application/json):</strong></p><p>根对象:</p>`,174)),s("table",null,[n[41]||(n[41]=s("thead",null,[s("tr",null,[s("th",null,"参数名"),s("th",null,"类型"),s("th",null,"内容"),s("th",null,"必要性"),s("th",null,"备注")])],-1)),s("tbody",null,[n[14]||(n[14]=s("tr",null,[s("td",null,"videos"),s("td",null,"array"),s("td",null,"视频信息"),s("td",null,"必要"),s("td",null,"若为分 P 视频, 请注意数组元素顺序")],-1)),n[15]||(n[15]=s("tr",null,[s("td",null,"cover"),s("td",null,"str"),s("td",null,"视频封面 URL"),s("td",null,"非必要"),s("td",null,[a("如果不传会自动取封面，参见"),s("a",{href:"#%E4%B8%8A%E4%BC%A0%E8%A7%86%E9%A2%91%E5%B0%81%E9%9D%A2"},"上传视频封面")])],-1)),n[16]||(n[16]=s("tr",null,[s("td",null,"cover43"),s("td",null,"str"),s("td",null,"视频封面 URL (比例为 4:3)"),s("td",null,"非必要"),s("td",null,"可为空")],-1)),n[17]||(n[17]=s("tr",null,[s("td",null,"title"),s("td",null,"str"),s("td",null,"视频标题"),s("td",null,"必要"),s("td",null,"最多 80 字")],-1)),n[18]||(n[18]=s("tr",null,[s("td",null,"copyright"),s("td",null,"num"),s("td",null,[a("1: 自制"),s("br"),a("2: 转载")]),s("td",null,"必要"),s("td")],-1)),n[19]||(n[19]=s("tr",null,[s("td",null,"tid"),s("td",null,"num"),s("td",null,"分区 ID"),s("td",null,"必要"),s("td",null,[a("Web端此参数已无法手动设置，参数值为从"),s("a",{href:"#%E9%A2%84%E6%B5%8B%E7%A8%BF%E4%BB%B6%E7%B1%BB%E5%9E%8B"},"预测稿件类型"),a("中获取第一个固定id")])],-1)),n[20]||(n[20]=s("tr",null,[s("td",null,"human_type2"),s("td",null,"num"),s("td",null,"新分区ID"),s("td",null,"非必要"),s("td",null,[a("从 "),s("a",{href:"#%E8%8E%B7%E5%8F%96%E6%96%B0%E5%88%86%E5%8C%BAID"},"新分区ID"),a(" 获取")])],-1)),n[21]||(n[21]=s("tr",null,[s("td",null,"tag"),s("td",null,"str"),s("td",null,"视频标签"),s("td",null,"必要"),s("td",null,[a("多个标签用 "),s("code",null,","),a(" 分隔, 最多 10 个")])],-1)),n[22]||(n[22]=s("tr",null,[s("td",null,"desc_format_id"),s("td",null,"num"),s("td",null,"简介格式 ID?"),s("td",null,"必要"),s("td",null,"9999: 纯文本")],-1)),n[23]||(n[23]=s("tr",null,[s("td",null,"desc"),s("td",null,"str"),s("td",null,"视频简介"),s("td",null,"非必要"),s("td",null,"最多 2000 字")],-1)),n[24]||(n[24]=s("tr",null,[s("td",null,"desc_v2"),s("td",null,"str"),s("td",null,"视频简介额外信息"),s("td",null,"非必要"),s("td",null,"比如有艾特操作时传递，见备注")],-1)),n[25]||(n[25]=s("tr",null,[s("td",null,"recreate"),s("td",null,"num"),s("td",null,"是否允许二创"),s("td",null,"必要"),s("td",null,[a("-1: 允许(默认)"),s("br"),a("1: 不允许")])],-1)),n[26]||(n[26]=s("tr",null,[s("td",null,"dynamic"),s("td",null,"str"),s("td",null,"粉丝动态"),s("td",null,"必要"),s("td")],-1)),n[27]||(n[27]=s("tr",null,[s("td",null,"interactive"),s("td",null,"num"),s("td",null,"互动视频?"),s("td",null,"必要"),s("td",null,"0: 否")],-1)),n[28]||(n[28]=s("tr",null,[s("td",null,"act_reserve_create"),s("td",null,"num"),s("td",null,"活动预约?"),s("td",null,"必要"),s("td",null,"0: 否")],-1)),n[29]||(n[29]=s("tr",null,[s("td",null,"no_disturbance"),s("td",null,"num"),s("td",null,"是否推送到动态"),s("td",null,"必要"),s("td",null,"0：不推送，1：推送")],-1)),n[30]||(n[30]=s("tr",null,[s("td",null,"no_reprint"),s("td",null,"num"),s("td",null,"是否允许转载"),s("td",null,"必要"),s("td",null,[a("1: 允许"),s("br"),a("0: 不允许")])],-1)),n[31]||(n[31]=s("tr",null,[s("td",null,"subtitle"),s("td",null,"obj"),s("td",null,"字幕信息"),s("td",null,"必要"),s("td")],-1)),n[32]||(n[32]=s("tr",null,[s("td",null,"dolby"),s("td",null,"num"),s("td",null,"杜比音效"),s("td",null,"必要"),s("td",null,[a("0: 否(默认)"),s("br"),a("1: 是")])],-1)),n[33]||(n[33]=s("tr",null,[s("td",null,"lossless_music"),s("td",null,"num"),s("td",null,"无损音乐"),s("td",null,"必要"),s("td",null,[a("0: 否(默认)"),s("br"),a("1: 是")])],-1)),n[34]||(n[34]=s("tr",null,[s("td",null,"up_selection_reply"),s("td",null,"bool"),s("td",null,"精选评论"),s("td",null,"必要"),s("td")],-1)),n[35]||(n[35]=s("tr",null,[s("td",null,"up_close_reply"),s("td",null,"bool"),s("td",null,"关闭评论"),s("td",null,"必要"),s("td")],-1)),n[36]||(n[36]=s("tr",null,[s("td",null,"up_close_danmu"),s("td",null,"bool"),s("td",null,"关闭弹幕"),s("td",null,"必要"),s("td")],-1)),n[37]||(n[37]=s("tr",null,[s("td",null,"web_os"),s("td",null,"num"),s("td",null,"平台类型?"),s("td",null,"必要"),s("td",null,"3")],-1)),n[38]||(n[38]=s("tr",null,[s("td",null,"is_only_self"),s("td",null,"可见性"),s("td",null,"非必要"),s("td",null,[a("0：公开"),s("br"),a("1：仅自己可见")]),s("td")],-1)),s("tr",null,[n[3]||(n[3]=s("td",null,"topic_id",-1)),n[4]||(n[4]=s("td",null,"话题id",-1)),n[5]||(n[5]=s("td",null,"非必要",-1)),s("td",null,[n[1]||(n[1]=a("可从")),o(l,{to:"/docs/creativecenter/upload.html#%E6%9F%A5%E8%AF%A2%E8%AF%9D%E9%A2%98"},{default:p(()=>n[0]||(n[0]=[a("查询话题")])),_:1,__:[0]}),n[2]||(n[2]=a("等相关接口获取"))]),n[6]||(n[6]=s("td",null,null,-1))]),s("tr",null,[n[10]||(n[10]=s("td",null,"mission_id",-1)),n[11]||(n[11]=s("td",null,"任务id",-1)),n[12]||(n[12]=s("td",null,"非必要",-1)),s("td",null,[n[8]||(n[8]=a("可从")),o(l,{to:"/docs/creativecenter/upload.html#%E6%9F%A5%E8%AF%A2%E8%AF%9D%E9%A2%98"},{default:p(()=>n[7]||(n[7]=[a("查询话题")])),_:1,__:[7]}),n[9]||(n[9]=a("等相关接口获取"))]),n[13]||(n[13]=s("td",null,null,-1))]),n[39]||(n[39]=s("tr",null,[s("td",null,"is_360"),s("td",null,"num"),s("td",null,"是否全景"),s("td",null,"非必要"),s("td",null,[a("-1：非全景"),s("br"),a("1：全景")])],-1)),n[40]||(n[40]=s("tr",null,[s("td",null,"neutral_mark"),s("td",null,"str"),s("td",null,"创作者声明"),s("td",null,"非必要"),s("td")],-1))])]),n[43]||(n[43]=t(`<p><code>videos</code> 数组中的对象:</p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>filename</td><td>str</td><td>视频文件名</td><td>必要</td><td>从视频上传接口获取, 无后缀名</td></tr><tr><td>title</td><td>str</td><td>分 P 标题</td><td>必要</td><td></td></tr><tr><td>desc</td><td>str</td><td>分 P 简介</td><td>必要</td><td></td></tr><tr><td>cid</td><td>num</td><td>分 P cid</td><td>必要</td><td>从视频上传接口获取, 即 <code>biz_id</code></td></tr></tbody></table><p><code>subtitle</code> 对象:</p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>open</td><td>num</td><td>是否启用字幕投稿</td><td>必要</td><td>0: 启用(默认)<br>1: 不启用</td></tr><tr><td>lan</td><td>str</td><td>字幕投稿语言</td><td>必要</td><td>可为空</td></tr></tbody></table><p><strong>desc_v2举例：</strong></p><div class="language-js line-numbers-mode" data-highlighter="shiki" data-ext="js" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-js"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#6A9955;">  // 如果两者不一致，可能导致后续在web修改出现错误</span></span>
<span class="line"><span style="color:#CE9178;">  &quot;desc&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;前面@陈睿 后面&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#CE9178;">	&quot;desc_v2&quot;</span><span style="color:#D4D4D4;">: [ </span><span style="color:#6A9955;">// 纯文字type是1，艾特用户type是2，biz_id为用户uid</span></span>
<span class="line"><span style="color:#D4D4D4;">		{</span></span>
<span class="line"><span style="color:#CE9178;">			&quot;biz_id&quot;</span><span style="color:#9CDCFE;">:</span><span style="color:#CE9178;"> &quot;&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#CE9178;">			&quot;raw_text&quot;</span><span style="color:#9CDCFE;">:</span><span style="color:#CE9178;"> &quot;前面&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#CE9178;">			&quot;type&quot;</span><span style="color:#9CDCFE;">:</span><span style="color:#B5CEA8;"> 1</span></span>
<span class="line"><span style="color:#D4D4D4;">		},</span></span>
<span class="line"><span style="color:#D4D4D4;">		{</span></span>
<span class="line"><span style="color:#CE9178;">			&quot;biz_id&quot;</span><span style="color:#9CDCFE;">:</span><span style="color:#CE9178;"> &quot;208259&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#6A9955;">// uid</span></span>
<span class="line"><span style="color:#CE9178;">			&quot;raw_text&quot;</span><span style="color:#9CDCFE;">:</span><span style="color:#CE9178;"> &quot;陈睿&quot;</span><span style="color:#D4D4D4;">,  </span><span style="color:#6A9955;">// 用户名</span></span>
<span class="line"><span style="color:#CE9178;">			&quot;type&quot;</span><span style="color:#9CDCFE;">:</span><span style="color:#B5CEA8;"> 2</span></span>
<span class="line"><span style="color:#D4D4D4;">		},</span></span>
<span class="line"><span style="color:#D4D4D4;">		{</span></span>
<span class="line"><span style="color:#CE9178;">			&quot;biz_id&quot;</span><span style="color:#9CDCFE;">:</span><span style="color:#CE9178;"> &quot;&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#CE9178;">			&quot;raw_text&quot;</span><span style="color:#9CDCFE;">:</span><span style="color:#CE9178;"> &quot; 后面&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#CE9178;">			&quot;type&quot;</span><span style="color:#9CDCFE;">:</span><span style="color:#B5CEA8;"> 1</span></span>
<span class="line"><span style="color:#D4D4D4;">		}</span></span>
<span class="line"><span style="color:#D4D4D4;">	]</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>示例:</strong></p><p>假设已经把需要发送的数据存放在文件 <code>./data.json</code> 中:</p><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;videos&quot;</span><span style="color:#D4D4D4;">: [</span></span>
<span class="line"><span style="color:#D4D4D4;">    {</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;filename&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;n240728ad33h52yqhxbtw51cb06sq9gx&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;title&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;Telnet手打HTTP&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;desc&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">      &quot;cid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">500001629877726</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#D4D4D4;">  ],</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;cover&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;https://archive.biliimg.com/bfs/archive/85447ea20431ef799382c403c84b4bfb82a41053.jpg&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;cover43&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;title&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;Telnet手打HTTP&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;copyright&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;tid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">122</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;tag&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;telnet,socket,tcp,linux,http&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;desc_format_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">9999</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;desc&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;测试用 Telnet 手打 HTTP/1.x 协议访问本地服务器, 无 SSL/TLS 支持&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;recreate&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">-1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;dynamic&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;for testing&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;interactive&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;act_reserve_create&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;no_disturbance&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;no_reprint&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;subtitle&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;open&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;lan&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">  },</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;dolby&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;lossless_music&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;up_selection_reply&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">false</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;up_close_reply&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">false</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;up_close_danmu&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">false</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;web_os&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">3</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;csrf&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;xxxxxxxxxxxxxxxxxxxxxxxx&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>发送请求:</p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -X</span><span style="color:#CE9178;"> POST</span><span style="color:#569CD6;"> --url</span><span style="color:#CE9178;"> &quot;https://member.bilibili.com/x/vu/web/add/v3&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;ts=$(</span><span style="color:#DCDCAA;">date</span><span style="color:#CE9178;"> +%s%3N)&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;csrf=xxxxxxxxxxxxxxxxxxxxxxxx&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-H </span><span style="color:#CE9178;">&quot;Content-Type: application/json; charset=utf-8&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data </span><span style="color:#CE9178;">@data.json</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&quot;SESSDATA=xxxxxx; bili_jct=xxxxxxxxxxxxxxxxxxxxxxxx&quot;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;aid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">112861976201494</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;bvid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;BV181vnexEmB&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="编辑视频稿件-web" tabindex="-1"><a class="header-anchor" href="#编辑视频稿件-web"><span>编辑视频稿件（Web）</span></a></h2><blockquote><p>https://member.bilibili.com/x/vu/web/edit</p></blockquote><p><em>请求方式: POST</em></p><p>认证方式：Cookie(SESSDATA)</p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>t</td><td>num</td><td>当前时间</td><td>非必要</td><td>UNIX 毫秒时间戳</td></tr><tr><td>csrf</td><td>str</td><td>CSRF Token (位于 Cookie 中 bili_jct)</td><td>必要</td><td></td></tr></tbody></table><p><strong>正文参数(application/json):</strong></p><p>绝大部分参数与上传一致，部分参数只有不对编辑生效</p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>aid</td><td>num</td><td>视频 ID</td><td>必要</td><td></td></tr><tr><td>videos</td><td>array</td><td>视频信息</td><td>必要</td><td>若为分 P 视频, 请注意数组元素顺序</td></tr><tr><td>title</td><td>str</td><td>视频标题</td><td>必要</td><td>最多 80 字</td></tr><tr><td>cover</td><td>str</td><td>视频封面 URL</td><td>非必要</td><td>如果不传会自动取封面，参见<a href="#%E4%B8%8A%E4%BC%A0%E8%A7%86%E9%A2%91%E5%B0%81%E9%9D%A2">上传视频封面</a></td></tr><tr><td>cover43</td><td>str</td><td>视频封面 URL (比例为 4:3)</td><td>非必要</td><td>可为空</td></tr><tr><td>copyright</td><td>num</td><td>1: 自制<br>2: 转载</td><td>必要</td><td></td></tr><tr><td>tid</td><td>num</td><td>分区 ID</td><td>必要</td><td></td></tr><tr><td>tag</td><td>str</td><td>视频标签</td><td>必要</td><td>多个标签用 <code>,</code> 分隔, 最多 10 个</td></tr><tr><td>desc_format_id</td><td>num</td><td>简介格式 ID?</td><td>必要</td><td>9999: 纯文本</td></tr><tr><td>desc</td><td>str</td><td>视频简介</td><td>非必要</td><td>最多 2000 字</td></tr><tr><td>desc_v2</td><td>str</td><td>视频简介额外信息</td><td>非必要</td><td>比如有艾特操作时传递，见上传视频</td></tr><tr><td>recreate</td><td>num</td><td>是否允许二创</td><td>必要</td><td>-1: 允许(默认)<br>1: 不允许</td></tr><tr><td>dynamic</td><td>str</td><td>粉丝动态</td><td>必要</td><td></td></tr><tr><td>interactive</td><td>num</td><td>互动视频?</td><td>必要</td><td>0: 否</td></tr><tr><td>act_reserve_create</td><td>num</td><td>活动预约?</td><td>必要</td><td>0: 否</td></tr><tr><td>no_disturbance</td><td>num</td><td>是否推送到动态</td><td>必要</td><td>0：不推送<br>1：推送</td></tr><tr><td>no_reprint</td><td>num</td><td>是否允许转载</td><td>必要</td><td>1: 允许<br>0: 不允许</td></tr><tr><td>subtitle</td><td>obj</td><td>字幕信息</td><td>必要</td><td></td></tr><tr><td>web_os</td><td>num</td><td>操作系统</td><td>必要</td><td>1: Web</td></tr><tr><td>mission_id</td><td>num</td><td>任务 ID</td><td>非必要</td><td>0: 无</td></tr><tr><td>csrf</td><td>str</td><td>CSRF Token (位于 Cookie 中 bili_jct)</td><td>必要</td><td></td></tr><tr><td>new_web_edit</td><td>num</td><td>未知</td><td>非必要</td><td>未知</td></tr><tr><td>is_360</td><td>num</td><td>是否全景</td><td>非必要</td><td>-1：非全景<br>1：全景</td></tr><tr><td>is_only_self</td><td>可见性</td><td>非必要</td><td>0：公开<br>1：仅自己可见</td><td></td></tr></tbody></table><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0: 成功<br>其他: 失败</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为 0</td></tr><tr><td>ttl</td><td>num</td><td>1</td><td></td></tr><tr><td>data</td><td>obj</td><td>信息本体</td><td></td></tr></tbody></table><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;aid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">123456</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;bvid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;BV1xx411c7mD&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="获取新分区id" tabindex="-1"><a class="header-anchor" href="#获取新分区id"><span>获取新分区ID</span></a></h2><blockquote><p>https://member.bilibili.com/x/vupre/web/archive/human/type2/list</p></blockquote><p><em>请求方式: GET</em></p><p>认证方式：Cookie(SESSDATA)</p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>t</td><td>num</td><td>当前时间</td><td>非必要</td><td>UNIX 毫秒时间戳</td></tr></tbody></table><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0: 成功<br>其他: 失败</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为 0</td></tr><tr><td>ttl</td><td>num</td><td>1</td><td></td></tr><tr><td>type_list</td><td>array</td><td>信息本体</td><td></td></tr></tbody></table><p><code>type_list</code> 对象:</p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>id</td><td>num</td><td>分区ID</td><td></td></tr><tr><td>name</td><td>str</td><td>分区名</td><td></td></tr></tbody></table><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;type_list&quot;</span><span style="color:#D4D4D4;">: [</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1001</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;影视&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1002</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;娱乐&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1003</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;音乐&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1004</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;舞蹈&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1005</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;动画&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1006</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;绘画&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1007</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;鬼畜&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1008</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;游戏&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1009</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;资讯&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1010</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;知识&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1011</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;人工智能&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1012</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;科技数码&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1013</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;汽车&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1014</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;时尚美妆&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1015</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;家装房产&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1016</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;户外潮流&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1017</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;健身&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1018</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;体育运动&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1019</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;手工&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1020</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;美食&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1021</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;小剧场&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1022</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;旅游出行&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1023</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;三农&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1024</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;动物&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1025</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;亲子&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1026</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;健康&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1027</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;情感&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1029</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;vlog&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1030</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;生活兴趣&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1031</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">          &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;生活经验&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      }</span></span>
<span class="line"><span style="color:#D4D4D4;">    ]</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="上传视频文件" tabindex="-1"><a class="header-anchor" href="#上传视频文件"><span>上传视频文件</span></a></h2><p>注: 目前看来上传的视频文件似乎不会自动删除, 而且似乎不是视频也可以上传的样子, 但是下载认证字段有效期只有 5 天</p><h3 id="上传流程" tabindex="-1"><a class="header-anchor" href="#上传流程"><span>上传流程</span></a></h3><p>整个上传流程较为复杂, 详细参见<a href="#Demo">Demo</a></p><ol><li><p><code>GET</code> <code>preupload</code> 接口, <a href="#%E8%8E%B7%E5%8F%96%E4%B8%8A%E4%BC%A0%E5%85%83%E6%95%B0%E6%8D%AE-%E9%A2%84%E4%B8%8A%E4%BC%A0">获取上传元数据</a></p></li><li><p><code>POST</code> 第 1 步得到的地址, <a href="#%E4%B8%8A%E4%BC%A0%E8%A7%86%E9%A2%91%E5%85%83%E6%95%B0%E6%8D%AE">上传视频元数据</a></p></li><li><p><code>PUT</code> 第 1 步得到的地址, <a href="#%E5%88%86%E7%89%87%E4%B8%8A%E4%BC%A0%E8%A7%86%E9%A2%91%E6%96%87%E4%BB%B6">分片上传视频文件</a></p></li><li><p><code>POST</code> 第 1 步得到的地址, <a href="#%E7%BB%93%E6%9D%9F%E4%B8%8A%E4%BC%A0%E8%A7%86%E9%A2%91%E6%96%87%E4%BB%B6">结束上传视频文件</a></p></li><li><p><code>GET</code> 第 1 步得到的地址, <a href="#%E4%B8%8B%E8%BD%BD%E5%B7%B2%E4%B8%8A%E4%BC%A0%E7%9A%84%E8%A7%86%E9%A2%91%E6%96%87%E4%BB%B6">下载已上传的视频文件</a> , 确认上传成功 (可选)</p></li></ol><h3 id="上传接口" tabindex="-1"><a class="header-anchor" href="#上传接口"><span>上传接口</span></a></h3><h4 id="获取上传元数据-预上传" tabindex="-1"><a class="header-anchor" href="#获取上传元数据-预上传"><span>获取上传元数据 (预上传)</span></a></h4><blockquote><p>https://member.bilibili.com/preupload</p></blockquote><p><em>请求方式: GET</em></p><p>认证方式：Cookie(SESSDATA)</p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>name</td><td>str</td><td>文件名</td><td>必要</td><td>会影响返回的上传地址</td></tr><tr><td>r</td><td>str</td><td>上传区域?</td><td>必要</td><td>upos</td></tr><tr><td>profile</td><td>str</td><td>上传配置?</td><td>必要</td><td>普通视频: ugcfx/bup<br>提交反馈: feedback/bup</td></tr><tr><td>probe_version</td><td>num</td><td>上传版本?</td><td>不必要</td><td>20221109</td></tr><tr><td>upcdn</td><td>str</td><td>上传 CDN?</td><td>不必要</td><td>txa</td></tr><tr><td>zone</td><td>str</td><td>上传区域?</td><td>不必要</td><td>cs</td></tr><tr><td>ssl</td><td>num</td><td>是否使用 SSL?</td><td>不必要</td><td>0</td></tr><tr><td>version</td><td>str</td><td>上传版本?</td><td>不必要</td><td>2.14.0.0</td></tr><tr><td>build</td><td>str</td><td>上传版本?</td><td>不必要</td><td>2140000</td></tr><tr><td>size</td><td>num</td><td>文件大小</td><td>不必要</td><td>视频文件大小, 单位 字节</td></tr><tr><td>webVersion</td><td>str</td><td>上传版本?</td><td>不必要</td><td>2.13.0</td></tr></tbody></table><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>OK</td><td>num</td><td>1</td><td></td></tr><tr><td>auth</td><td>str</td><td>上传凭证</td><td>作为后面请求中请求头, 有效期 5 天</td></tr><tr><td>biz_id</td><td>num</td><td>业务 ID?</td><td></td></tr><tr><td>chunk_retry</td><td>num</td><td>重试次数?</td><td></td></tr><tr><td>chunk_retry_delay</td><td>num</td><td>重试延迟?</td><td></td></tr><tr><td>chunk_size</td><td>num</td><td>分块大小</td><td>后面要用</td></tr><tr><td>endpoint</td><td>str</td><td>上传节点</td><td>后面要用</td></tr><tr><td>endpoints</td><td>array</td><td>上传节点列表</td><td></td></tr><tr><td>expose_params</td><td>null</td><td></td><td></td></tr><tr><td>put_query</td><td>str</td><td>上传参数?</td><td></td></tr><tr><td>threads</td><td>num</td><td>上传线程数</td><td></td></tr><tr><td>timeout</td><td>num</td><td>超时时间?</td><td></td></tr><tr><td>uip</td><td>str</td><td>你的 IP</td><td></td></tr><tr><td>upos_uri</td><td>str</td><td>上传地址</td><td>后面要用</td></tr></tbody></table><p><code>endpoints</code> 数组:</p><table><thead><tr><th>项</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>0</td><td>str</td><td>上传节点1</td><td></td></tr><tr><td>……</td><td>str</td><td>……</td><td></td></tr><tr><td>n</td><td>str</td><td>上传节点n</td><td></td></tr></tbody></table><p><strong>示例:</strong></p><p>假设视频文件名为 <code>2024-07-28_15-37-50.mkv</code>, 视频大小为 <code>305333744</code> 字节</p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -G</span><span style="color:#CE9178;"> &quot;https://member.bilibili.com/preupload&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&quot;name=2024-07-28_15-37-50.mkv&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&quot;r=upos&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-urlencode </span><span style="color:#CE9178;">&quot;profile=ugcfx/bup&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&quot;SESSDATA=xxxxxxxxxxx&quot;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;OK&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;auth&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;ak=1494471752&amp;cdn=%2F%2Fupos-cs-upcdntxa.bilivideo.com&amp;os=upos&amp;sign=b6c5cc520a281200906aea97e190b098&amp;timestamp=1722155211.324&amp;uid=616368979&amp;uip=108.181.24.77&amp;uport=52096&amp;use_dqp=0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;biz_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">500001630152509</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;chunk_retry&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">10</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;chunk_retry_delay&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">3</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;chunk_size&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">10485760</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;endpoint&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;//upos-cs-upcdntxa.bilivideo.com&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;endpoints&quot;</span><span style="color:#D4D4D4;">: [</span></span>
<span class="line"><span style="color:#CE9178;">    &quot;//upos-cs-upcdntxa.bilivideo.com&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#CE9178;">    &quot;//upos-cs-upcdnalia.bilivideo.com&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">  ],</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;expose_params&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#569CD6;">null</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;put_query&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;os=upos&amp;profile=ugcfx%2Fbup&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;threads&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">3</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;timeout&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1200</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;uip&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;108.181.24.77&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;upos_uri&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;upos://ugcfx2lf/n240728ad1p51if4g3ke4s3o95sznogy.mkv&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h4 id="上传视频元数据" tabindex="-1"><a class="header-anchor" href="#上传视频元数据"><span>上传视频元数据</span></a></h4><blockquote><p>URL 拼接格式: <code>&quot;https&quot;</code> + <a href="#%E8%8E%B7%E5%8F%96%E4%B8%8A%E4%BC%A0%E5%85%83%E6%95%B0%E6%8D%AE-%E9%A2%84%E4%B8%8A%E4%BC%A0">上一个接口</a>的<code>endpoint</code> + 上一个接口的<code>upos_uri</code>去掉协议名<br> JavaScript 模板字符串: <code>https:\${preupload.endpoint}/\${endpoint.upos_uri.replace(&quot;upos://&quot;, &quot;&quot;)}</code></p></blockquote><p><em>请求方式: POST</em></p><p>认证方式：请求头 <code>X-Upos-Auth</code> 为上一接口得到的 <code>auth</code></p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>uploads</td><td>str</td><td>留空</td><td>必要</td><td>留空</td></tr><tr><td>output</td><td>str</td><td>输出格式</td><td>不必要</td><td>默认为 json(推荐), 留空为 xml</td></tr><tr><td>profile</td><td>str</td><td>上传配置?</td><td>必要</td><td>与上一个接口保持相同</td></tr><tr><td>filesize</td><td>num</td><td>文件大小</td><td>必要</td><td>视频文件大小, 单位 字节<br>feedback/bup 不必要</td></tr><tr><td>partsize</td><td>num</td><td>分块大小</td><td>必要</td><td>上一个接口返回, 且后面要用<br>feedback/bup 不必要</td></tr><tr><td>biz_id</td><td>num</td><td>业务 ID?</td><td>必要</td><td>上一个接口返回, 且后面要用<br>feedback/bup 不必要</td></tr></tbody></table><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>OK</td><td>num</td><td>1</td><td></td></tr><tr><td>bucket</td><td>str</td><td>空间名?</td><td></td></tr><tr><td>key</td><td>str</td><td>文件名?</td><td></td></tr><tr><td>upload_id</td><td>str</td><td>上传 ID</td><td>后面要用</td></tr></tbody></table><p><strong>示例:</strong></p><p>假设上一接口返回的 <code>auth</code> 为 <code>ak=1494471752&amp;cdn=%2F%2Fupos-cs-upcdntxa.bilivideo.com&amp;os=upos&amp;sign=4004b35628e982bc90b59cec86f8c441&amp;timestamp=1722173443.298&amp;uid=616368979&amp;uip=104.28.153.18&amp;uport=44282&amp;use_dqp=0</code>, <code>biz_id</code> 为<code>500001630454700</code>, <code>endpoint</code> 为 <code>//upos-cs-upcdntxa.bilivideo.com</code>, <code>upos_uri</code> 为 <code>upos://ugcfx2lf/n240728adhejliqv0kqyg2s5n6huv501.mkv</code>, <code>chunk_size</code> 为 <code>10485760</code>. 视频文件大小为 <code>305333744</code> 字节.</p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -X</span><span style="color:#CE9178;"> POST</span><span style="color:#569CD6;"> --url</span><span style="color:#CE9178;"> &quot;https://upos-cs-upcdntxa.bilivideo.com/ugcfx2lf/n240728adhejliqv0kqyg2s5n6huv501.mkv\` </span><span style="color:#D7BA7D;">\\</span></span>
<span class="line"><span style="color:#DCDCAA;">--url-query</span><span style="color:#CE9178;"> &quot;uploads=&quot; </span><span style="color:#D7BA7D;">\\</span></span>
<span class="line"><span style="color:#CE9178;">--url-query &quot;output=json&quot; </span><span style="color:#D7BA7D;">\\</span></span>
<span class="line"><span style="color:#CE9178;">--url-query &quot;profile=ugcfx/bup&quot; </span><span style="color:#D7BA7D;">\\</span></span>
<span class="line"><span style="color:#CE9178;">--url-query &quot;filesize=305333744&quot; </span><span style="color:#D7BA7D;">\\</span></span>
<span class="line"><span style="color:#CE9178;">--url-query &quot;partsize=10485760&quot; </span><span style="color:#D7BA7D;">\\</span></span>
<span class="line"><span style="color:#CE9178;">--url-query &quot;biz_id=500001630454700&quot; </span><span style="color:#D7BA7D;">\\</span></span>
<span class="line"><span style="color:#CE9178;">-H &quot;X-Upos-Auth: ak=1494471752&amp;cdn=%2F%2Fupos-cs-upcdntxa.bilivideo.com&amp;os=upos&amp;sign=4004b35628e982bc90b59cec86f8c441&amp;timestamp=1722173443.298&amp;uid=616368979&amp;uip=104.28.153.18&amp;uport=44282&amp;use_dqp=0&quot; </span><span style="color:#D7BA7D;">\\</span></span>
<span class="line"><span style="color:#CE9178;">-b &quot;SESSDATA=xxxxxxxxx&quot;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;OK&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;bucket&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;ugcfx2lf&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;key&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;/n240728adhejliqv0kqyg2s5n6huv501.mkv&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;upload_id&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;26c674b4-0dce-45f5-a9cd-a199d9c982bf&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h4 id="分片上传视频文件" tabindex="-1"><a class="header-anchor" href="#分片上传视频文件"><span>分片上传视频文件</span></a></h4><blockquote><p>URL 同 <a href="#%E4%B8%8A%E4%BC%A0%E8%A7%86%E9%A2%91%E5%85%83%E6%95%B0%E6%8D%AE">上一个接口</a></p></blockquote><p><em>请求方式: PUT</em></p><p>认证方式：请求头 <code>X-Upos-Auth</code> 为上上一接口得到的 <code>auth</code></p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>partNumber</td><td>num</td><td>分块序号</td><td>必要</td><td>从 1 开始</td></tr><tr><td>uploadId</td><td>str</td><td>上传 ID</td><td>必要</td><td>上一个接口返回</td></tr><tr><td>chunk</td><td>num</td><td>分块序号</td><td>必要</td><td>从 0 开始</td></tr><tr><td>chunks</td><td>num</td><td>分块总数</td><td>必要</td><td>自行计算: 文件大小除以分块大小并向上取整</td></tr><tr><td>size</td><td>num</td><td>该分块大小</td><td>必要</td><td>该实际上传字节数</td></tr><tr><td>start</td><td>num</td><td>该分块开始位置</td><td>必要</td><td>已实际上传字节数</td></tr><tr><td>end</td><td>num</td><td>该分块结束位置</td><td>必要</td><td>该分块上传结束后实际上传总字节数</td></tr><tr><td>total</td><td>num</td><td>总大小</td><td>必要</td><td>视频文件大小, 单位 字节</td></tr></tbody></table><p><strong>正文参数(application/octet-stream):</strong></p><p>视频文件在该分块的字节流</p><p><strong>纯文本回复:</strong></p><div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-text"><span class="line"><span>MULTIPART_PUT_SUCCESS</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p><strong>示例:</strong></p><p>假设上上一接口返回的 <code>auth</code> 为 <code>ak=1494471752&amp;cdn=%2F%2Fupos-cs-upcdntxa.bilivideo.com&amp;os=upos&amp;sign=911dd5b995895805d785aa607b4153b6&amp;timestamp=1722212776.333&amp;uid=616368979&amp;uip=108.181.24.77&amp;uport=36044&amp;use_dqp=0</code>, <code>endpoint</code> 为 <code>//upos-cs-upcdntxa.bilivideo.com</code>, <code>upos_uri</code> 为 <code>upos://ugcfx2lf/n240729ad7gxi43yaoml312h2nbt2pnf.xz</code>, <code>chunk_size</code> 为 <code>10485760</code>.</p><p>上一接口返回的 <code>upload_id</code> 为 <code>8130090a-16f7-4fe6-8a29-198f5abce913</code>.</p><p>视频文件名为 <code>20240724-remove-linux-then-install.tar.xz</code>, 文件大小为 <code>278255704</code> 字节.</p><p>假设您要上传的分块序号为 <code>1</code>, 该分块大小为 <code>10485760</code>, 该分块开始位置为 <code>0</code>, 该分块结束位置为 <code>10485760</code>, 该分块实际上传字节数为 <code>10485760</code>, 您已将文件分块存放至 <code>part01.tar.xz</code>, <code>part02.tar.xz</code>, ..., <code>part27.tar.xz</code>.</p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -X</span><span style="color:#CE9178;"> PUT</span><span style="color:#569CD6;"> --url</span><span style="color:#CE9178;"> &quot;https://upos-cs-upcdntxa.bilivideo.com/ugcfx2lf/n240729ad7gxi43yaoml312h2nbt2pnf.xz&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;partNumber=1&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;uploadId=8130090a-16f7-4fe6-8a29-198f5abce913&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;chunk=0&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;chunks=27&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;size=10485760&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;start=0&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;end=10485760&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;total=278255704&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-H </span><span style="color:#CE9178;">&quot;X-Upos-Auth: ak=1494471752&amp;cdn=%2F%2Fupos-cs-upcdntxa.bilivideo.com&amp;os=upos&amp;sign=911dd5b995895805d785aa607b4153b6&amp;timestamp=1722212776.333&amp;uid=616368979&amp;uip=108.181.24.77&amp;uport=36044&amp;use_dqp=0&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-H </span><span style="color:#CE9178;">&quot;Content-Type: application/octet-stream&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-binary </span><span style="color:#CE9178;">@part01.tar.xz</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&quot;SESSDATA=xxxxxxxxx&quot;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-text"><span class="line"><span>MULTIPART_PUT_SUCCESS</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div></details><h4 id="结束上传视频文件" tabindex="-1"><a class="header-anchor" href="#结束上传视频文件"><span>结束上传视频文件</span></a></h4><blockquote><p>URL 同 <a href="#%E5%88%86%E7%89%87%E4%B8%8A%E4%BC%A0%E8%A7%86%E9%A2%91%E6%96%87%E4%BB%B6">上一个接口</a></p></blockquote><p><em>请求方式: POST</em></p><p>认证方式：请求头 <code>X-Upos-Auth</code> 为上上上一接口得到的 <code>auth</code></p><p><strong>URL参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>output</td><td>str</td><td>输出格式</td><td>不必要</td><td>默认为 json(推荐), 留空为 xml</td></tr><tr><td>name</td><td>str</td><td>文件名</td><td>必要</td><td>视频文件名</td></tr><tr><td>profile</td><td>str</td><td>上传配置?</td><td>必要</td><td>与上一个接口相同, 普通视频: ugcfx/bup</td></tr><tr><td>uploadId</td><td>str</td><td>上传 ID</td><td>必要</td><td>与上一个接口相同</td></tr><tr><td>biz_id</td><td>num</td><td>业务 ID?</td><td>必要</td><td>与上上一个接口相同</td></tr></tbody></table><p><strong>正文参数(application/json):</strong></p><p>根对象:</p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>parts</td><td>array</td><td>各分块信息</td><td>必要</td><td>按实际上传顺序而不是分块序号顺序</td></tr></tbody></table><p><code>parts</code> 数组:</p><table><thead><tr><th>项</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>0</td><td>obj</td><td>分块信息1</td><td>必要</td><td>按实际上传顺序而不是分块序号顺序</td></tr><tr><td>1</td><td>obj</td><td>分块信息2</td><td>必要</td><td></td></tr><tr><td>……</td><td>obj</td><td>……</td><td></td><td></td></tr><tr><td>n</td><td>obj</td><td>分块信息n</td><td>必要</td><td></td></tr></tbody></table><p><code>parts</code> 数组中的对象:</p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>partNumber</td><td>num</td><td>分块序号</td><td>必要</td><td>从 1 开始</td></tr><tr><td>eTag</td><td>str</td><td><code>etag</code></td><td>必要</td><td></td></tr></tbody></table><p><strong>JSON回复:</strong></p><p>与 <a href="#%E4%B8%8A%E4%BC%A0%E8%A7%86%E9%A2%91%E5%85%83%E6%95%B0%E6%8D%AE">上上一个接口</a> 相同</p><p><strong>示例:</strong></p><p>假设上上上一接口返回的 <code>auth</code> 为 <code>ak=1494471752&amp;cdn=%2F%2Fupos-cs-upcdntxa.bilivideo.com&amp;os=upos&amp;sign=911dd5b995895805d785aa607b4153b6&amp;timestamp=1722212776.333&amp;uid=616368979&amp;uip=108.181.24.77&amp;uport=36044&amp;use_dqp=0</code>, <code>endpoint</code> 为 <code>//upos-cs-upcdntxa.bilivideo.com</code>, <code>upos_uri</code> 为 <code>upos://ugcfx2lf/n240729ad7gxi43yaoml312h2nbt2pnf.xz</code>, <code>biz_id</code> 为 <code>500001630826789</code>.</p><p>上上一接口返回的 <code>upload_id</code> 为 <code>8130090a-16f7-4fe6-8a29-198f5abce913</code>.</p><p>视频文件名为 <code>20240724-remove-linux-then-install.tar.xz</code>, 文件大小为 <code>278255704</code> 字节.</p><p>假设您已经全部上传完毕, 共上传 <code>27</code> 个分块, 本次请求上传的的内容存放在 <code>body.json</code> 文件中.</p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -X</span><span style="color:#CE9178;"> PUT</span><span style="color:#569CD6;"> --url</span><span style="color:#CE9178;"> &quot;https://upos-cs-upcdntxa.bilivideo.com/ugcfx2lf/n240729ad7gxi43yaoml312h2nbt2pnf.xz&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;output=json&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;name=20240724-remove-linux-then-install.tar.xz&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;profile=ugcfx%2Fbup&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;uploadId=8130090a-16f7-4fe6-8a29-198f5abce913&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&quot;biz_id=500001630826789&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-H </span><span style="color:#CE9178;">&quot;X-Upos-Auth: ak=1494471752&amp;cdn=%2F%2Fupos-cs-upcdntxa.bilivideo.com&amp;os=upos&amp;sign=911dd5b995895805d785aa607b4153b6&amp;timestamp=1722212776.333&amp;uid=616368979&amp;uip=108.181.24.77&amp;uport=36044&amp;use_dqp=0&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-H </span><span style="color:#CE9178;">&quot;Content-Type: application/json&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--data-binary </span><span style="color:#CE9178;">@body.json</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&quot;SESSDATA=xxxxxxxxx&quot;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;OK&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;location&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;ugcfx2lf/n240729ad7gxi43yaoml312h2nbt2pnf.xz&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;bucket&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;ugcfx2lf&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;key&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;/n240729ad7gxi43yaoml312h2nbt2pnf.xz&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h4 id="下载已上传的视频文件" tabindex="-1"><a class="header-anchor" href="#下载已上传的视频文件"><span>下载已上传的视频文件</span></a></h4><blockquote><p>URL 同 <a href="#%E7%BB%93%E6%9D%9F%E4%B8%8A%E4%BC%A0%E8%A7%86%E9%A2%91%E6%96%87%E4%BB%B6">上一个接口</a></p></blockquote><p><em>请求方式: GET</em></p><p>认证方式：请求头 <code>X-Upos-Auth</code> 为上上上上一接口得到的 <code>auth</code></p><p>注: 由于 <code>X-Upos-Auth</code> 有效期只有 5 天, 过期请求将返回 HTTP 403 如下</p><div class="language-http line-numbers-mode" data-highlighter="shiki" data-ext="http" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-http"><span class="line"><span style="color:#569CD6;">HTTP</span><span style="color:#D4D4D4;">/</span><span style="color:#B5CEA8;">1.1</span><span style="color:#B5CEA8;"> 403</span><span style="color:#CE9178;"> Forbidden</span></span>
<span class="line"><span style="color:#569CD6;">Bili-Trace-Id:</span><span style="color:#CE9178;"> 3e3f2db61366adbf</span></span>
<span class="line"><span style="color:#569CD6;">Server:</span><span style="color:#CE9178;"> upos@hcsgw@jscs-bvc-hcsgw-public-02</span></span>
<span class="line"><span style="color:#569CD6;">X-Bili-Trace-Id:</span><span style="color:#CE9178;"> 0d8ca1af6d3510253e3f2db61366adbf</span></span>
<span class="line"><span style="color:#569CD6;">X-Upos-Auth:</span><span style="color:#CE9178;"> AUTH_TS_GT_5DAY AUTH=ak=1494471752&amp;cdn=%2F%2Fupos-cs-upcdntxa.bilivideo.com&amp;os=upos&amp;sign=911dd5b995895805d785aa607b4153b6&amp;timestamp=1722212776.333&amp;uid=616368979&amp;uip=108.181.24.77&amp;uport=36044&amp;use_dqp=0 Now=1722662669 DURATION=449893</span></span>
<span class="line"><span style="color:#569CD6;">Content-Length:</span><span style="color:#CE9178;"> 0</span></span>
<span class="line"><span style="color:#569CD6;">Connection:</span><span style="color:#CE9178;"> keep-alive</span></span>
<span class="line"><span style="color:#569CD6;">Date:</span><span style="color:#CE9178;"> Sat, 03 Aug 2024 05:24:29 GMT</span></span>
<span class="line"><span style="color:#569CD6;">EO-LOG-UUID:</span><span style="color:#CE9178;"> 4296647794590631154</span></span>
<span class="line"><span style="color:#569CD6;">EO-Cache-Status:</span><span style="color:#CE9178;"> MISS</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>字节流回复:</strong></p><p>视频文件字节流</p><p><strong>示例:</strong></p><p>假设请求上一接口时的 URL 为 <code>https://upos-cs-upcdntxa.bilivideo.com/ugcfx2lf/n240729ad7gxi43yaoml312h2nbt2pnf.xz</code>, 请求头的 <code>X-Upos-Auth</code> 为 <code>ak=1494471752&amp;cdn=%2F%2Fupos-cs-upcdntxa.bilivideo.com&amp;os=upos&amp;sign=911dd5b995895805d785aa607b4153b6&amp;timestamp=1722212776.333&amp;uid=616368979&amp;uip=108.181.24.77&amp;uport=36044&amp;use_dqp=0</code>, 您想要下载到运行目录下的 <code>file.tar.xz</code> 文件</p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -G</span><span style="color:#CE9178;"> &quot;https://upos-cs-upcdntxa.bilivideo.com/ugcfx2lf/n240729ad7gxi43yaoml312h2nbt2pnf.xz&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-H </span><span style="color:#CE9178;">&quot;X-Upos-Auth: ak=1494471752&amp;cdn=%2F%2Fupos-cs-upcdntxa.bilivideo.com&amp;os=upos&amp;sign=911dd5b995895805d785aa607b4153b6&amp;timestamp=1722212776.333&amp;uid=616368979&amp;uip=108.181.24.77&amp;uport=36044&amp;use_dqp=0&quot;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--output </span><span style="color:#CE9178;">file.tar.xz</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看检查示例:</summary><div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-text"><span class="line"><span>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current</span></span>
<span class="line"><span>                                 Dload  Upload   Total   Spent    Left  Speed</span></span>
<span class="line"><span>100  265M  100  265M    0     0  9493k      0  0:00:28  0:00:28 --:--:-- 10.3M</span></span>
<span class="line"><span>$ sha512sum file.tar.xz</span></span>
<span class="line"><span>abfbedf1ac4f251c81103beb4d5406af1e0b64b9d54e99bfc77d2a8a9c4913a9fd2f1751828ace8aac036f6385609d99e251437b07a0491caca2ad7069a57003  file.tar.xz</span></span>
<span class="line"><span>$ sha512sum ~/Documents/video-proj/20240724-remove-linux-then-install.tar.xz</span></span>
<span class="line"><span>abfbedf1ac4f251c81103beb4d5406af1e0b64b9d54e99bfc77d2a8a9c4913a9fd2f1751828ace8aac036f6385609d99e251437b07a0491caca2ad7069a57003  /home/sess/Documents/video-proj/20240724-remove-linux-then-install.tar.xz</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h3 id="demo" tabindex="-1"><a class="header-anchor" href="#demo"><span>Demo</span></a></h3><h4 id="java" tabindex="-1"><a class="header-anchor" href="#java"><span>Java</span></a></h4><p>注: 需要 Gson 依赖, Java 8+, 单线程上传, 无异常处理, 仅供参考</p><div class="language-java line-numbers-mode" data-highlighter="shiki" data-ext="java" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-java"><span class="line"><span style="color:#569CD6;">import</span><span style="color:#D4D4D4;"> java.io.ByteArrayOutputStream;</span></span>
<span class="line"><span style="color:#569CD6;">import</span><span style="color:#D4D4D4;"> java.io.File;</span></span>
<span class="line"><span style="color:#569CD6;">import</span><span style="color:#D4D4D4;"> java.io.FileInputStream;</span></span>
<span class="line"><span style="color:#569CD6;">import</span><span style="color:#D4D4D4;"> java.io.IOException;</span></span>
<span class="line"><span style="color:#569CD6;">import</span><span style="color:#D4D4D4;"> java.io.InputStream;</span></span>
<span class="line"><span style="color:#569CD6;">import</span><span style="color:#D4D4D4;"> java.net.HttpURLConnection;</span></span>
<span class="line"><span style="color:#569CD6;">import</span><span style="color:#D4D4D4;"> java.net.URI;</span></span>
<span class="line"><span style="color:#569CD6;">import</span><span style="color:#D4D4D4;"> java.net.URLEncoder;</span></span>
<span class="line"><span style="color:#569CD6;">import</span><span style="color:#D4D4D4;"> java.nio.charset.StandardCharsets;</span></span>
<span class="line"><span style="color:#569CD6;">import</span><span style="color:#D4D4D4;"> java.util.StringJoiner;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#569CD6;">import</span><span style="color:#D4D4D4;"> com.google.gson.Gson;</span></span>
<span class="line"><span style="color:#569CD6;">import</span><span style="color:#D4D4D4;"> com.google.gson.GsonBuilder;</span></span>
<span class="line"><span style="color:#569CD6;">import</span><span style="color:#D4D4D4;"> com.google.gson.JsonArray;</span></span>
<span class="line"><span style="color:#569CD6;">import</span><span style="color:#D4D4D4;"> com.google.gson.JsonObject;</span></span>
<span class="line"><span style="color:#569CD6;">import</span><span style="color:#D4D4D4;"> com.google.gson.JsonSyntaxException;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A9955;">/**</span></span>
<span class="line"><span style="color:#6A9955;"> * A demo class for uploading videos to Bilibili.</span></span>
<span class="line"><span style="color:#6A9955;"> * </span></span>
<span class="line"><span style="color:#6A9955;"> * </span><span style="color:#569CD6;">@author</span><span style="color:#6A9955;"> SessX6cf</span></span>
<span class="line"><span style="color:#6A9955;"> */</span></span>
<span class="line"><span style="color:#569CD6;">public</span><span style="color:#569CD6;"> class</span><span style="color:#4EC9B0;"> BiliVideoUploader</span><span style="color:#D4D4D4;"> {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#569CD6;">  private</span><span style="color:#569CD6;"> static</span><span style="color:#4EC9B0;"> String</span><span style="color:#9CDCFE;"> SESSDATA</span><span style="color:#D4D4D4;">;</span></span>
<span class="line"><span style="color:#569CD6;">  private</span><span style="color:#569CD6;"> static</span><span style="color:#4EC9B0;"> File</span><span style="color:#9CDCFE;"> VIDEO_FILE</span><span style="color:#D4D4D4;">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#569CD6;">  public</span><span style="color:#569CD6;"> static</span><span style="color:#4EC9B0;"> void</span><span style="color:#DCDCAA;"> main</span><span style="color:#D4D4D4;">(</span><span style="color:#4EC9B0;">String</span><span style="color:#D4D4D4;">[] </span><span style="color:#9CDCFE;">args</span><span style="color:#D4D4D4;">) </span><span style="color:#569CD6;">throws</span><span style="color:#4EC9B0;"> IOException</span><span style="color:#D4D4D4;"> {</span></span>
<span class="line"><span style="color:#4EC9B0;">    long</span><span style="color:#9CDCFE;"> ts</span><span style="color:#D4D4D4;"> = </span><span style="color:#9CDCFE;">System</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">currentTimeMillis</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"><span style="color:#C586C0;">    if</span><span style="color:#D4D4D4;"> (</span><span style="color:#9CDCFE;">args</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">length</span><span style="color:#D4D4D4;"> &lt; </span><span style="color:#B5CEA8;">2</span><span style="color:#D4D4D4;">) {</span></span>
<span class="line"><span style="color:#9CDCFE;">      System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;Usage: java BiliVideoUploader &lt;video_file&gt; &lt;sessdata&gt;&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#C586C0;">      return</span><span style="color:#D4D4D4;">;</span></span>
<span class="line"><span style="color:#D4D4D4;">    } </span><span style="color:#C586C0;">else</span><span style="color:#D4D4D4;"> {</span></span>
<span class="line"><span style="color:#D4D4D4;">      VIDEO_FILE = </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> File</span><span style="color:#D4D4D4;">(args[</span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">]);</span></span>
<span class="line"><span style="color:#C586C0;">      if</span><span style="color:#D4D4D4;"> (!</span><span style="color:#9CDCFE;">VIDEO_FILE</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">isFile</span><span style="color:#D4D4D4;">()) {</span></span>
<span class="line"><span style="color:#9CDCFE;">        System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;It is not a file!&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#C586C0;">        return</span><span style="color:#D4D4D4;">;</span></span>
<span class="line"><span style="color:#D4D4D4;">      } </span><span style="color:#C586C0;">else</span><span style="color:#C586C0;"> if</span><span style="color:#D4D4D4;"> (!</span><span style="color:#9CDCFE;">VIDEO_FILE</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">canRead</span><span style="color:#D4D4D4;">()) {</span></span>
<span class="line"><span style="color:#9CDCFE;">        System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;Cannot read the file!&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#C586C0;">        return</span><span style="color:#D4D4D4;">;</span></span>
<span class="line"><span style="color:#D4D4D4;">      } </span><span style="color:#C586C0;">else</span><span style="color:#C586C0;"> if</span><span style="color:#D4D4D4;"> (</span><span style="color:#9CDCFE;">VIDEO_FILE</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">isDirectory</span><span style="color:#D4D4D4;">()) {</span></span>
<span class="line"><span style="color:#9CDCFE;">        System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;You can play a directory?!&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#C586C0;">        return</span><span style="color:#D4D4D4;">;</span></span>
<span class="line"><span style="color:#D4D4D4;">      }</span></span>
<span class="line"><span style="color:#D4D4D4;">      SESSDATA = args[</span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">];</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#6A9955;">    // step 1: preupload video</span></span>
<span class="line"><span style="color:#9CDCFE;">    System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;step 1: preupload video&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#4EC9B0;">    JsonObject</span><span style="color:#9CDCFE;"> preuploadVideo</span><span style="color:#D4D4D4;"> = </span><span style="color:#DCDCAA;">preuploadVideo</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"><span style="color:#6A9955;">    // step 2: post video meta</span></span>
<span class="line"><span style="color:#9CDCFE;">    System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;step 2: post video meta&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#4EC9B0;">    JsonObject</span><span style="color:#9CDCFE;"> postVideoMeta</span><span style="color:#D4D4D4;"> = </span><span style="color:#DCDCAA;">postVideoMeta</span><span style="color:#D4D4D4;">(preuploadVideo);</span></span>
<span class="line"><span style="color:#6A9955;">    // step 3: upload video</span></span>
<span class="line"><span style="color:#9CDCFE;">    System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;step 3: upload video&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#4EC9B0;">    int</span><span style="color:#9CDCFE;"> chunks</span><span style="color:#D4D4D4;"> = </span><span style="color:#DCDCAA;">uploadVideo</span><span style="color:#D4D4D4;">(preuploadVideo, postVideoMeta);</span></span>
<span class="line"><span style="color:#6A9955;">    // step 4: end upload</span></span>
<span class="line"><span style="color:#9CDCFE;">    System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;step 4: end upload&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#DCDCAA;">    endupload</span><span style="color:#D4D4D4;">(preuploadVideo, postVideoMeta, chunks);</span></span>
<span class="line"><span style="color:#6A9955;">    // finished</span></span>
<span class="line"><span style="color:#9CDCFE;">    System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;finished (&quot;</span><span style="color:#D4D4D4;"> + (</span><span style="color:#9CDCFE;">System</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">currentTimeMillis</span><span style="color:#D4D4D4;">() - ts) + </span><span style="color:#CE9178;">&quot;ms)&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color:#569CD6;">  private</span><span style="color:#569CD6;"> static</span><span style="color:#4EC9B0;"> String</span><span style="color:#DCDCAA;"> querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#4EC9B0;">String</span><span style="color:#9CDCFE;"> key</span><span style="color:#D4D4D4;">, </span><span style="color:#4EC9B0;">String</span><span style="color:#9CDCFE;"> value</span><span style="color:#D4D4D4;">) </span><span style="color:#569CD6;">throws</span><span style="color:#4EC9B0;"> IOException</span><span style="color:#D4D4D4;"> {</span></span>
<span class="line"><span style="color:#C586C0;">    return</span><span style="color:#D4D4D4;"> key + </span><span style="color:#CE9178;">&quot;=&quot;</span><span style="color:#D4D4D4;"> + </span><span style="color:#9CDCFE;">URLEncoder</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">encode</span><span style="color:#D4D4D4;">(value, </span><span style="color:#CE9178;">&quot;UTF-8&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color:#569CD6;">  private</span><span style="color:#569CD6;"> static</span><span style="color:#4EC9B0;"> HttpURLConnection</span><span style="color:#DCDCAA;"> conn</span><span style="color:#D4D4D4;">(</span><span style="color:#4EC9B0;">String</span><span style="color:#9CDCFE;"> url</span><span style="color:#D4D4D4;">, </span><span style="color:#4EC9B0;">String</span><span style="color:#9CDCFE;"> method</span><span style="color:#D4D4D4;">) </span><span style="color:#569CD6;">throws</span><span style="color:#4EC9B0;"> IOException</span><span style="color:#D4D4D4;"> {</span></span>
<span class="line"><span style="color:#4EC9B0;">    HttpURLConnection</span><span style="color:#9CDCFE;"> conn</span><span style="color:#D4D4D4;">;</span></span>
<span class="line"><span style="color:#C586C0;">    try</span><span style="color:#D4D4D4;"> {</span></span>
<span class="line"><span style="color:#D4D4D4;">      conn = (HttpURLConnection) </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> URI</span><span style="color:#D4D4D4;">(url).</span><span style="color:#DCDCAA;">toURL</span><span style="color:#D4D4D4;">().</span><span style="color:#DCDCAA;">openConnection</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"><span style="color:#D4D4D4;">    } </span><span style="color:#C586C0;">catch</span><span style="color:#D4D4D4;"> (</span><span style="color:#4EC9B0;">java.net.URISyntaxException</span><span style="color:#9CDCFE;"> e</span><span style="color:#D4D4D4;">) {</span></span>
<span class="line"><span style="color:#C586C0;">      throw</span><span style="color:#C586C0;"> new</span><span style="color:#DCDCAA;"> IOException</span><span style="color:#D4D4D4;">(e);</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#9CDCFE;">    conn</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">setRequestMethod</span><span style="color:#D4D4D4;">(method);</span></span>
<span class="line"><span style="color:#6A9955;">    // conn.setRequestProperty(&quot;User-Agent&quot;, &quot;Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0&quot;);</span></span>
<span class="line"><span style="color:#C586C0;">    if</span><span style="color:#D4D4D4;"> (</span><span style="color:#9CDCFE;">url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">contains</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;bilibili.com&quot;</span><span style="color:#D4D4D4;">)) </span><span style="color:#9CDCFE;">conn</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">setRequestProperty</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;Cookie&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;SESSDATA=&quot;</span><span style="color:#D4D4D4;"> + SESSDATA);</span></span>
<span class="line"><span style="color:#C586C0;">    return</span><span style="color:#D4D4D4;"> conn;</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color:#569CD6;">  private</span><span style="color:#569CD6;"> static</span><span style="color:#4EC9B0;"> byte</span><span style="color:#D4D4D4;">[] </span><span style="color:#DCDCAA;">inputStreamToString</span><span style="color:#D4D4D4;">(</span><span style="color:#4EC9B0;">HttpURLConnection</span><span style="color:#9CDCFE;"> conn</span><span style="color:#D4D4D4;">) </span><span style="color:#569CD6;">throws</span><span style="color:#4EC9B0;"> IOException</span><span style="color:#D4D4D4;"> {</span></span>
<span class="line"><span style="color:#4EC9B0;">    ByteArrayOutputStream</span><span style="color:#9CDCFE;"> baos</span><span style="color:#D4D4D4;"> = </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> ByteArrayOutputStream</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"><span style="color:#4EC9B0;">    InputStream</span><span style="color:#9CDCFE;"> in</span><span style="color:#D4D4D4;">;</span></span>
<span class="line"><span style="color:#D4D4D4;">    in = </span><span style="color:#9CDCFE;">conn</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">getInputStream</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"><span style="color:#4EC9B0;">    int</span><span style="color:#9CDCFE;"> b</span><span style="color:#D4D4D4;">;</span></span>
<span class="line"><span style="color:#C586C0;">    while</span><span style="color:#D4D4D4;"> ((b = </span><span style="color:#9CDCFE;">in</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">read</span><span style="color:#D4D4D4;">()) != -</span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">) {</span></span>
<span class="line"><span style="color:#9CDCFE;">      baos</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">write</span><span style="color:#D4D4D4;">(b);</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#9CDCFE;">    in</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">close</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"><span style="color:#C586C0;">    return</span><span style="color:#9CDCFE;"> baos</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">toByteArray</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color:#569CD6;">  private</span><span style="color:#569CD6;"> static</span><span style="color:#569CD6;"> final</span><span style="color:#4EC9B0;"> Gson</span><span style="color:#9CDCFE;"> GSON</span><span style="color:#D4D4D4;"> = </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> GsonBuilder</span><span style="color:#D4D4D4;">().</span><span style="color:#DCDCAA;">setPrettyPrinting</span><span style="color:#D4D4D4;">().</span><span style="color:#DCDCAA;">create</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#569CD6;">  private</span><span style="color:#569CD6;"> static</span><span style="color:#4EC9B0;"> JsonObject</span><span style="color:#DCDCAA;"> preuploadVideo</span><span style="color:#D4D4D4;">() </span><span style="color:#569CD6;">throws</span><span style="color:#4EC9B0;"> IOException</span><span style="color:#D4D4D4;"> {</span></span>
<span class="line"><span style="color:#4EC9B0;">    StringJoiner</span><span style="color:#9CDCFE;"> url</span><span style="color:#D4D4D4;"> = </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> StringJoiner</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;&amp;&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;https://member.bilibili.com/preupload?&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">    url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;name&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">VIDEO_FILE</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">getName</span><span style="color:#D4D4D4;">()));</span></span>
<span class="line"><span style="color:#6A9955;">    // url.add(querypart(&quot;size&quot;, String.valueOf(VIDEO_FILE.length())));</span></span>
<span class="line"><span style="color:#9CDCFE;">    url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;r&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;upos&quot;</span><span style="color:#D4D4D4;">));</span></span>
<span class="line"><span style="color:#9CDCFE;">    url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;profile&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;ugcfx/bup&quot;</span><span style="color:#D4D4D4;">));</span></span>
<span class="line"><span style="color:#4EC9B0;">    HttpURLConnection</span><span style="color:#9CDCFE;"> conn</span><span style="color:#D4D4D4;"> = </span><span style="color:#DCDCAA;">conn</span><span style="color:#D4D4D4;">(</span><span style="color:#9CDCFE;">url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">toString</span><span style="color:#D4D4D4;">(), </span><span style="color:#CE9178;">&quot;GET&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">    System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;GET &quot;</span><span style="color:#D4D4D4;"> + </span><span style="color:#9CDCFE;">url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">toString</span><span style="color:#D4D4D4;">());</span></span>
<span class="line"><span style="color:#4EC9B0;">    String</span><span style="color:#9CDCFE;"> response</span><span style="color:#D4D4D4;"> = </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> String</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">inputStreamToString</span><span style="color:#D4D4D4;">(conn), </span><span style="color:#9CDCFE;">StandardCharsets</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">UTF_8</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#C586C0;">    try</span><span style="color:#D4D4D4;"> {</span></span>
<span class="line"><span style="color:#4EC9B0;">      JsonObject</span><span style="color:#9CDCFE;"> json</span><span style="color:#D4D4D4;"> = </span><span style="color:#9CDCFE;">GSON</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">fromJson</span><span style="color:#D4D4D4;">(response, </span><span style="color:#9CDCFE;">JsonObject</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">class</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">      System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#9CDCFE;">GSON</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">toJson</span><span style="color:#D4D4D4;">(json));</span></span>
<span class="line"><span style="color:#C586C0;">      return</span><span style="color:#D4D4D4;"> json;</span></span>
<span class="line"><span style="color:#D4D4D4;">    } </span><span style="color:#C586C0;">catch</span><span style="color:#D4D4D4;"> (</span><span style="color:#4EC9B0;">JsonSyntaxException</span><span style="color:#9CDCFE;"> e</span><span style="color:#D4D4D4;">) {</span></span>
<span class="line"><span style="color:#9CDCFE;">      System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(response);</span></span>
<span class="line"><span style="color:#C586C0;">      throw</span><span style="color:#D4D4D4;"> e;</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color:#569CD6;">  private</span><span style="color:#569CD6;"> static</span><span style="color:#4EC9B0;"> JsonObject</span><span style="color:#DCDCAA;"> postVideoMeta</span><span style="color:#D4D4D4;">(</span><span style="color:#4EC9B0;">JsonObject</span><span style="color:#9CDCFE;"> preuploadVideo</span><span style="color:#D4D4D4;">) </span><span style="color:#569CD6;">throws</span><span style="color:#4EC9B0;"> IOException</span><span style="color:#D4D4D4;"> {</span></span>
<span class="line"><span style="color:#4EC9B0;">    String</span><span style="color:#9CDCFE;"> schemeandhost</span><span style="color:#D4D4D4;"> = </span><span style="color:#CE9178;">&quot;https:&quot;</span><span style="color:#D4D4D4;"> + </span><span style="color:#9CDCFE;">preuploadVideo</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">get</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;endpoint&quot;</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">getAsString</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"><span style="color:#4EC9B0;">    String</span><span style="color:#9CDCFE;"> path</span><span style="color:#D4D4D4;"> = </span><span style="color:#9CDCFE;">preuploadVideo</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">get</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;upos_uri&quot;</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">getAsString</span><span style="color:#D4D4D4;">().</span><span style="color:#DCDCAA;">replaceFirst</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;upos:/&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#4EC9B0;">    StringJoiner</span><span style="color:#9CDCFE;"> url</span><span style="color:#D4D4D4;"> = </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> StringJoiner</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;&amp;&quot;</span><span style="color:#D4D4D4;">, schemeandhost + path + </span><span style="color:#CE9178;">&quot;?&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">    url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;uploads&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">)); </span><span style="color:#6A9955;">// WARNING: this is not a typo, it&#39;s required, or 404</span></span>
<span class="line"><span style="color:#9CDCFE;">    url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;output&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;json&quot;</span><span style="color:#D4D4D4;">));</span></span>
<span class="line"><span style="color:#9CDCFE;">    url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;profile&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;ugcfx/bup&quot;</span><span style="color:#D4D4D4;">));</span></span>
<span class="line"><span style="color:#9CDCFE;">    url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;filesize&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">String</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">valueOf</span><span style="color:#D4D4D4;">(</span><span style="color:#9CDCFE;">VIDEO_FILE</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">length</span><span style="color:#D4D4D4;">())));</span></span>
<span class="line"><span style="color:#9CDCFE;">    url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;partsize&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">preuploadVideo</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">get</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;chunk_size&quot;</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">getAsString</span><span style="color:#D4D4D4;">()));</span></span>
<span class="line"><span style="color:#9CDCFE;">    url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;biz_id&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">preuploadVideo</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">get</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;biz_id&quot;</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">getAsString</span><span style="color:#D4D4D4;">()));</span></span>
<span class="line"><span style="color:#4EC9B0;">    HttpURLConnection</span><span style="color:#9CDCFE;"> conn</span><span style="color:#D4D4D4;"> = </span><span style="color:#DCDCAA;">conn</span><span style="color:#D4D4D4;">(</span><span style="color:#9CDCFE;">url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">toString</span><span style="color:#D4D4D4;">(), </span><span style="color:#CE9178;">&quot;POST&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">    conn</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">setRequestProperty</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;X-Upos-Auth&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">preuploadVideo</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">get</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;auth&quot;</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">getAsString</span><span style="color:#D4D4D4;">()); </span><span style="color:#6A9955;">// 403 without it</span></span>
<span class="line"><span style="color:#9CDCFE;">    System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;POST &quot;</span><span style="color:#D4D4D4;"> + </span><span style="color:#9CDCFE;">url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">toString</span><span style="color:#D4D4D4;">());</span></span>
<span class="line"><span style="color:#4EC9B0;">    String</span><span style="color:#9CDCFE;"> response</span><span style="color:#D4D4D4;"> = </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> String</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">inputStreamToString</span><span style="color:#D4D4D4;">(conn), </span><span style="color:#9CDCFE;">StandardCharsets</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">UTF_8</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#C586C0;">    try</span><span style="color:#D4D4D4;"> {</span></span>
<span class="line"><span style="color:#4EC9B0;">      JsonObject</span><span style="color:#9CDCFE;"> json</span><span style="color:#D4D4D4;"> = </span><span style="color:#9CDCFE;">GSON</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">fromJson</span><span style="color:#D4D4D4;">(response, </span><span style="color:#9CDCFE;">JsonObject</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">class</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">      System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#9CDCFE;">GSON</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">toJson</span><span style="color:#D4D4D4;">(json));</span></span>
<span class="line"><span style="color:#C586C0;">      return</span><span style="color:#D4D4D4;"> json;</span></span>
<span class="line"><span style="color:#D4D4D4;">    } </span><span style="color:#C586C0;">catch</span><span style="color:#D4D4D4;"> (</span><span style="color:#4EC9B0;">JsonSyntaxException</span><span style="color:#9CDCFE;"> e</span><span style="color:#D4D4D4;">) {</span></span>
<span class="line"><span style="color:#9CDCFE;">      System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(response);</span></span>
<span class="line"><span style="color:#C586C0;">      throw</span><span style="color:#D4D4D4;"> e;</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color:#569CD6;">  private</span><span style="color:#569CD6;"> static</span><span style="color:#4EC9B0;"> int</span><span style="color:#DCDCAA;"> uploadVideo</span><span style="color:#D4D4D4;">(</span><span style="color:#4EC9B0;">JsonObject</span><span style="color:#9CDCFE;"> preuploadVideo</span><span style="color:#D4D4D4;">, </span><span style="color:#4EC9B0;">JsonObject</span><span style="color:#9CDCFE;"> postVideoMeta</span><span style="color:#D4D4D4;">) </span><span style="color:#569CD6;">throws</span><span style="color:#4EC9B0;"> IOException</span><span style="color:#D4D4D4;"> {</span></span>
<span class="line"><span style="color:#4EC9B0;">    long</span><span style="color:#9CDCFE;"> startts</span><span style="color:#D4D4D4;"> = </span><span style="color:#9CDCFE;">System</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">currentTimeMillis</span><span style="color:#D4D4D4;">() - </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">;</span></span>
<span class="line"><span style="color:#4EC9B0;">    String</span><span style="color:#9CDCFE;"> schemeandhost</span><span style="color:#D4D4D4;"> = </span><span style="color:#CE9178;">&quot;https:&quot;</span><span style="color:#D4D4D4;"> + </span><span style="color:#9CDCFE;">preuploadVideo</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">get</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;endpoint&quot;</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">getAsString</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"><span style="color:#4EC9B0;">    String</span><span style="color:#9CDCFE;"> path</span><span style="color:#D4D4D4;"> = </span><span style="color:#9CDCFE;">preuploadVideo</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">get</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;upos_uri&quot;</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">getAsString</span><span style="color:#D4D4D4;">().</span><span style="color:#DCDCAA;">replaceFirst</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;upos:/&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#4EC9B0;">    String</span><span style="color:#9CDCFE;"> urlp</span><span style="color:#D4D4D4;"> = schemeandhost + path + </span><span style="color:#CE9178;">&quot;?&quot;</span><span style="color:#D4D4D4;">;</span></span>
<span class="line"><span style="color:#4EC9B0;">    long</span><span style="color:#9CDCFE;"> length</span><span style="color:#D4D4D4;"> = </span><span style="color:#9CDCFE;">VIDEO_FILE</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">length</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"><span style="color:#4EC9B0;">    byte</span><span style="color:#D4D4D4;">[] </span><span style="color:#9CDCFE;">buffer</span><span style="color:#D4D4D4;"> = </span><span style="color:#C586C0;">new</span><span style="color:#4EC9B0;"> byte</span><span style="color:#D4D4D4;">[</span><span style="color:#9CDCFE;">preuploadVideo</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">get</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;chunk_size&quot;</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">getAsInt</span><span style="color:#D4D4D4;">()];</span></span>
<span class="line"><span style="color:#4EC9B0;">    int</span><span style="color:#9CDCFE;"> size</span><span style="color:#D4D4D4;"> = </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">;</span></span>
<span class="line"><span style="color:#4EC9B0;">    int</span><span style="color:#9CDCFE;"> chunks</span><span style="color:#D4D4D4;"> = (</span><span style="color:#4EC9B0;">int</span><span style="color:#D4D4D4;">) </span><span style="color:#9CDCFE;">Math</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">ceil</span><span style="color:#D4D4D4;">(length / (</span><span style="color:#4EC9B0;">double</span><span style="color:#D4D4D4;">) </span><span style="color:#9CDCFE;">buffer</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">length</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#4EC9B0;">    InputStream</span><span style="color:#9CDCFE;"> in</span><span style="color:#D4D4D4;"> = </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> FileInputStream</span><span style="color:#D4D4D4;">(VIDEO_FILE);</span></span>
<span class="line"><span style="color:#C586C0;">    for</span><span style="color:#D4D4D4;"> (</span><span style="color:#4EC9B0;">int</span><span style="color:#9CDCFE;"> chunk</span><span style="color:#D4D4D4;"> = </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">; chunk &lt; chunks; chunk++) {</span></span>
<span class="line"><span style="color:#9CDCFE;">      System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;speed: &quot;</span><span style="color:#D4D4D4;"> + (chunk * </span><span style="color:#9CDCFE;">buffer</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">length</span><span style="color:#D4D4D4;">) / (</span><span style="color:#9CDCFE;">System</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">currentTimeMillis</span><span style="color:#D4D4D4;">() - startts) + </span><span style="color:#CE9178;">&quot;bytes/s&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">      System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;chunk: &quot;</span><span style="color:#D4D4D4;"> + (chunk + </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">) + </span><span style="color:#CE9178;">&quot;/&quot;</span><span style="color:#D4D4D4;"> + chunks);</span></span>
<span class="line"><span style="color:#D4D4D4;">      size = </span><span style="color:#9CDCFE;">in</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">read</span><span style="color:#D4D4D4;">(buffer, </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">buffer</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">length</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#C586C0;">      if</span><span style="color:#D4D4D4;"> (size == -</span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">) {</span></span>
<span class="line"><span style="color:#C586C0;">        break</span><span style="color:#D4D4D4;">;</span></span>
<span class="line"><span style="color:#D4D4D4;">      }</span></span>
<span class="line"><span style="color:#4EC9B0;">      StringJoiner</span><span style="color:#9CDCFE;"> url</span><span style="color:#D4D4D4;"> = </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> StringJoiner</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;&amp;&quot;</span><span style="color:#D4D4D4;">, urlp, </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">      url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;partNumber&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">String</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">valueOf</span><span style="color:#D4D4D4;">(chunk + </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">)));</span></span>
<span class="line"><span style="color:#9CDCFE;">      url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;uploadId&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">postVideoMeta</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">get</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;upload_id&quot;</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">getAsString</span><span style="color:#D4D4D4;">()));</span></span>
<span class="line"><span style="color:#9CDCFE;">      url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;chunk&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">String</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">valueOf</span><span style="color:#D4D4D4;">(chunk)));</span></span>
<span class="line"><span style="color:#9CDCFE;">      url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;chunks&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">String</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">valueOf</span><span style="color:#D4D4D4;">(chunks)));</span></span>
<span class="line"><span style="color:#9CDCFE;">      url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;size&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">String</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">valueOf</span><span style="color:#D4D4D4;">(size)));</span></span>
<span class="line"><span style="color:#9CDCFE;">      url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;start&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">String</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">valueOf</span><span style="color:#D4D4D4;">(chunk * </span><span style="color:#9CDCFE;">buffer</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">length</span><span style="color:#D4D4D4;">)));</span></span>
<span class="line"><span style="color:#9CDCFE;">      url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;end&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">String</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">valueOf</span><span style="color:#D4D4D4;">((chunk) * </span><span style="color:#9CDCFE;">buffer</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">length</span><span style="color:#D4D4D4;"> + size)));</span></span>
<span class="line"><span style="color:#9CDCFE;">      url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;total&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">String</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">valueOf</span><span style="color:#D4D4D4;">(length)));</span></span>
<span class="line"><span style="color:#4EC9B0;">      HttpURLConnection</span><span style="color:#9CDCFE;"> conn</span><span style="color:#D4D4D4;"> = </span><span style="color:#DCDCAA;">conn</span><span style="color:#D4D4D4;">(</span><span style="color:#9CDCFE;">url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">toString</span><span style="color:#D4D4D4;">(), </span><span style="color:#CE9178;">&quot;PUT&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">      conn</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">setRequestProperty</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;X-Upos-Auth&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">preuploadVideo</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">get</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;auth&quot;</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">getAsString</span><span style="color:#D4D4D4;">());</span></span>
<span class="line"><span style="color:#9CDCFE;">      conn</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">setRequestProperty</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;Content-Type&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;application/octet-stream&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">      conn</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">setRequestProperty</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;Content-Length&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">String</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">valueOf</span><span style="color:#D4D4D4;">(size));</span></span>
<span class="line"><span style="color:#9CDCFE;">      conn</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">setDoOutput</span><span style="color:#D4D4D4;">(</span><span style="color:#569CD6;">true</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">      conn</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">getOutputStream</span><span style="color:#D4D4D4;">().</span><span style="color:#DCDCAA;">write</span><span style="color:#D4D4D4;">(buffer, </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">, size);</span></span>
<span class="line"><span style="color:#9CDCFE;">      System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;PUT &quot;</span><span style="color:#D4D4D4;"> + </span><span style="color:#9CDCFE;">url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">toString</span><span style="color:#D4D4D4;">());</span></span>
<span class="line"><span style="color:#4EC9B0;">      String</span><span style="color:#9CDCFE;"> response</span><span style="color:#D4D4D4;"> = </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> String</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">inputStreamToString</span><span style="color:#D4D4D4;">(conn), </span><span style="color:#9CDCFE;">StandardCharsets</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">UTF_8</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">      System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(response);</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#9CDCFE;">    in</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">close</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"><span style="color:#C586C0;">    return</span><span style="color:#D4D4D4;"> chunks;</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color:#569CD6;">  private</span><span style="color:#569CD6;"> static</span><span style="color:#4EC9B0;"> void</span><span style="color:#DCDCAA;"> endupload</span><span style="color:#D4D4D4;">(</span><span style="color:#4EC9B0;">JsonObject</span><span style="color:#9CDCFE;"> preuploadVideo</span><span style="color:#D4D4D4;">, </span><span style="color:#4EC9B0;">JsonObject</span><span style="color:#9CDCFE;"> postVideoMeta</span><span style="color:#D4D4D4;">, </span><span style="color:#4EC9B0;">int</span><span style="color:#9CDCFE;"> chunks</span><span style="color:#D4D4D4;">) </span><span style="color:#569CD6;">throws</span><span style="color:#4EC9B0;"> IOException</span><span style="color:#D4D4D4;"> {</span></span>
<span class="line"><span style="color:#4EC9B0;">    String</span><span style="color:#9CDCFE;"> schemeandhost</span><span style="color:#D4D4D4;"> = </span><span style="color:#CE9178;">&quot;https:&quot;</span><span style="color:#D4D4D4;"> + </span><span style="color:#9CDCFE;">preuploadVideo</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">get</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;endpoint&quot;</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">getAsString</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"><span style="color:#4EC9B0;">    String</span><span style="color:#9CDCFE;"> path</span><span style="color:#D4D4D4;"> = </span><span style="color:#9CDCFE;">preuploadVideo</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">get</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;upos_uri&quot;</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">getAsString</span><span style="color:#D4D4D4;">().</span><span style="color:#DCDCAA;">replaceFirst</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;upos:/&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#4EC9B0;">    StringJoiner</span><span style="color:#9CDCFE;"> url</span><span style="color:#D4D4D4;"> = </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> StringJoiner</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;&amp;&quot;</span><span style="color:#D4D4D4;">, schemeandhost + path + </span><span style="color:#CE9178;">&quot;?&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">    url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;output&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;json&quot;</span><span style="color:#D4D4D4;">));</span></span>
<span class="line"><span style="color:#9CDCFE;">    url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;name&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">VIDEO_FILE</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">getName</span><span style="color:#D4D4D4;">()));</span></span>
<span class="line"><span style="color:#9CDCFE;">    url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;profile&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;ugcfx/bup&quot;</span><span style="color:#D4D4D4;">));</span></span>
<span class="line"><span style="color:#9CDCFE;">    url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;uploadId&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">postVideoMeta</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">get</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;upload_id&quot;</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">getAsString</span><span style="color:#D4D4D4;">()));</span></span>
<span class="line"><span style="color:#9CDCFE;">    url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">querypart</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;biz_id&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">preuploadVideo</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">get</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;biz_id&quot;</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">getAsString</span><span style="color:#D4D4D4;">()));</span></span>
<span class="line"><span style="color:#4EC9B0;">    JsonArray</span><span style="color:#9CDCFE;"> parts</span><span style="color:#D4D4D4;"> = </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> JsonArray</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"><span style="color:#C586C0;">    for</span><span style="color:#D4D4D4;"> (</span><span style="color:#4EC9B0;">int</span><span style="color:#9CDCFE;"> i</span><span style="color:#D4D4D4;"> = </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">; i &lt;= chunks; i++) {</span></span>
<span class="line"><span style="color:#4EC9B0;">      JsonObject</span><span style="color:#9CDCFE;"> part</span><span style="color:#D4D4D4;"> = </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> JsonObject</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"><span style="color:#9CDCFE;">      part</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">addProperty</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;partNumber&quot;</span><span style="color:#D4D4D4;">, i);</span></span>
<span class="line"><span style="color:#9CDCFE;">      part</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">addProperty</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;eTag&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;etag&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">      parts</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(part);</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#4EC9B0;">    JsonObject</span><span style="color:#9CDCFE;"> body</span><span style="color:#D4D4D4;"> = </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> JsonObject</span><span style="color:#D4D4D4;">();</span></span>
<span class="line"><span style="color:#9CDCFE;">    body</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">add</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;parts&quot;</span><span style="color:#D4D4D4;">, parts);</span></span>
<span class="line"><span style="color:#4EC9B0;">    HttpURLConnection</span><span style="color:#9CDCFE;"> conn</span><span style="color:#D4D4D4;"> = </span><span style="color:#DCDCAA;">conn</span><span style="color:#D4D4D4;">(</span><span style="color:#9CDCFE;">url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">toString</span><span style="color:#D4D4D4;">(), </span><span style="color:#CE9178;">&quot;POST&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">    conn</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">setRequestProperty</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;X-Upos-Auth&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">preuploadVideo</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">get</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;auth&quot;</span><span style="color:#D4D4D4;">).</span><span style="color:#DCDCAA;">getAsString</span><span style="color:#D4D4D4;">());</span></span>
<span class="line"><span style="color:#9CDCFE;">    conn</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">setRequestProperty</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;Content-Type&quot;</span><span style="color:#D4D4D4;">, </span><span style="color:#CE9178;">&quot;application/json; charset=UTF-8&quot;</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">    conn</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">setDoOutput</span><span style="color:#D4D4D4;">(</span><span style="color:#569CD6;">true</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">    conn</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">getOutputStream</span><span style="color:#D4D4D4;">().</span><span style="color:#DCDCAA;">write</span><span style="color:#D4D4D4;">(</span><span style="color:#9CDCFE;">body</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">toString</span><span style="color:#D4D4D4;">().</span><span style="color:#DCDCAA;">getBytes</span><span style="color:#D4D4D4;">(</span><span style="color:#9CDCFE;">StandardCharsets</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">UTF_8</span><span style="color:#D4D4D4;">));</span></span>
<span class="line"><span style="color:#9CDCFE;">    System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#CE9178;">&quot;POST &quot;</span><span style="color:#D4D4D4;"> + </span><span style="color:#9CDCFE;">url</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">toString</span><span style="color:#D4D4D4;">());</span></span>
<span class="line"><span style="color:#4EC9B0;">    String</span><span style="color:#9CDCFE;"> response</span><span style="color:#D4D4D4;"> = </span><span style="color:#C586C0;">new</span><span style="color:#DCDCAA;"> String</span><span style="color:#D4D4D4;">(</span><span style="color:#DCDCAA;">inputStreamToString</span><span style="color:#D4D4D4;">(conn), </span><span style="color:#9CDCFE;">StandardCharsets</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">UTF_8</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#C586C0;">    try</span><span style="color:#D4D4D4;"> {</span></span>
<span class="line"><span style="color:#4EC9B0;">      JsonObject</span><span style="color:#9CDCFE;"> json</span><span style="color:#D4D4D4;"> = </span><span style="color:#9CDCFE;">GSON</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">fromJson</span><span style="color:#D4D4D4;">(response, </span><span style="color:#9CDCFE;">JsonObject</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">class</span><span style="color:#D4D4D4;">);</span></span>
<span class="line"><span style="color:#9CDCFE;">      System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(</span><span style="color:#9CDCFE;">GSON</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">toJson</span><span style="color:#D4D4D4;">(json));</span></span>
<span class="line"><span style="color:#D4D4D4;">    } </span><span style="color:#C586C0;">catch</span><span style="color:#D4D4D4;"> (</span><span style="color:#4EC9B0;">JsonSyntaxException</span><span style="color:#9CDCFE;"> e</span><span style="color:#D4D4D4;">) {</span></span>
<span class="line"><span style="color:#9CDCFE;">      System</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">out</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">println</span><span style="color:#D4D4D4;">(response);</span></span>
<span class="line"><span style="color:#C586C0;">      throw</span><span style="color:#D4D4D4;"> e;</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div>`,126))])}const C=e(D,[["render",i]]),v=JSON.parse('{"path":"/docs/creativecenter/upload.html","title":"投稿","lang":"zh-CN","frontmatter":{},"git":{"updatedTime":1752447446000,"contributors":[{"name":"SessionHu","username":"SessionHu","email":"102411014+SessionHu@users.noreply.github.com","commits":2,"url":"https://github.com/SessionHu"},{"name":"SocialSisterYi","username":"SocialSisterYi","email":"45892418+SocialSisterYi@users.noreply.github.com","commits":1,"url":"https://github.com/SocialSisterYi"},{"name":"renmu123","username":"renmu123","email":"1101022351@qq.com","commits":1,"url":"https://github.com/renmu123"}],"changelog":[{"hash":"73a2d9879626b7fad0351f35907480a6f7c7d8c7","time":1752447446000,"email":"1101022351@qq.com","author":"renmu123","message":"补充上传稿件和合集相关接口 (#1315)"},{"hash":"1e24c6b1889160c4c35c01416aa4239501accf5f","time":1726759053000,"email":"102411014+SessionHu@users.noreply.github.com","author":"Session小胡","message":"调整部分接口描述与错误修复 (#1088)","coAuthors":[{"name":"社会易姐QwQ","email":"45892418+SocialSisterYi@users.noreply.github.com"}]},{"hash":"60a0c5d1a2f44fe61335da04571305fa7727a968","time":1724238159000,"email":"102411014+SessionHu@users.noreply.github.com","author":"Session小胡","message":"feat: 各种接口补充与错误修正 (#1066)"}]},"filePathRelative":"docs/creativecenter/upload.md"}');export{C as comp,v as data};
