{% extends 'base_console.html' %} {% block title %}客户控制台{% endblock %} {% block page_title %}概览{% endblock %} {% block console_content %} {% if user_is_expired(g.user) %} 当前账号尚未配置有效期或已经到期,请联系管理员开通。您仍可登录并查看历史记录。 {% endif %} 你好,{{ g.user['username'] }} 实时监控您的接口调取概况与账号限量。 {{ '未开通 / 已到期' if user_is_expired(g.user) else '服务有效' }} 24 小时调用{{ stats['calls'] or 0 }} 成功调用{{ stats['successes'] or 0 }} 剩余解析积分{{ '不限制' if g.user['credits'] == -1 else (g.user['credits'] or 0) }} 账号 QPS 限制{{ g.user['qps_limit'] }} 账号到期时间{{ format_user_expiry(g.user) }} 近 7 天 近 30 天 近 90 天 近 180 天 全周期 API 调用趋势 {% if current_days == 0 %}全周期您账号的每日接口请求总数与成功解析数{% else %}近 {{ current_days }} 天您账号的每日接口请求总数与成功解析数{% endif %} 总调用量 成功调用量 {% for tick in chart_data['y_ticks'] %} {{ tick['val'] }} {% endfor %} {% for item in chart_data['trend'] %} {% if item['show_label'] %} {{ item['short_date'] }} {% endif %} {% endfor %} 平台使用分布 {% if current_days == 0 %}全周期您账号各平台调取占比与分布{% else %}近 {{ current_days }} 天您账号各平台解析调取占比与分布{% endif %} {% if pie_data['total_calls'] == 0 %} 当前时间范围内暂无调用记录 {% else %} {% for item in pie_data['items'] %} {{ item['platform'] }}: {{ item['calls'] }} 次 ({{ item['percentage'] }}%) {% endfor %} {{ pie_data['total_calls'] }} 总解析量 {% for item in pie_data['items'] %} {{ item['platform'] }} {{ item['percentage'] }}% {% endfor %} {% endif %} 密钥调取活跃榜 (Top 10) {% if current_days == 0 %}全周期调用量最高的 API 密钥{% else %}近 {{ current_days }} 天调用量最高的 API 密钥{% endif %} {% if not top_keys %} 暂无 API 密钥调用排行数据 {% else %} {% for item in top_keys %} {{ item['name'] }} ({{ item['key_prefix'] }}...) {{ item['calls'] }} 次 {% endfor %} {% endif %} {% if new_api_key %} 生成成功 新生成的 API Key × 密钥明文仅在此处展示一次,请妥善保管。(注:示例中的 YOUR_URL 需替换为您要解析的具体视频或图集链接) {{ new_api_key }} 复制密钥 复制 GET URL 复制 cURL 命令 {% endif %} API 密钥 最多可创建 10 个密钥。推荐在正式生产项目中使用 Authorization 请求头传参。 + 创建 API Key 密钥名称 Key 前缀 最后使用时间 开关 操作 {% for key in keys %} {{ key['name'] }} {{ key['key_prefix'] }}•••••••••••• {{ key['last_used_at'][:19]|replace('T',' ') if key['last_used_at'] else '从未' }} 编辑 删除 {% else %} 暂无 API 密钥,账号开通后即可创建。 {% endfor %} 创建新 API Key × 密钥名称 修改密钥名称 × 密钥名称 开发者文档 推荐在正式生产项目中使用 Authorization 请求头传参。 GET {{ request.url_root }}api/v1/parse?url=YOUR_URL Authorization: Bearer mp_xxxxxxxxx 小白兼容写法(直接放入 URL 参数): {{ request.url_root }}api/v1/parse?key=mp_xxxxxxxxx&url=YOUR_URL 💡 提示:YOUR_URL 代表您需要解析的目标视频或图集链接(例如:https://v.douyin.com/xxx)。程序代码中发起请求时,建议将 url 参数值进行 URL 编码(URL Encode)。 请求日志 时间 平台 状态 耗时 错误码 {% for log in logs %} {{ log['created_at'][:19]|replace('T',' ') }} {{ log['platform'] or '-' }} {{ log['status_code'] }} {{ log['duration_ms'] }} ms {{ log['error_code'] or '-' }} {% else %} 暂无调用记录 {% endfor %} {% endblock %}
密钥明文仅在此处展示一次,请妥善保管。(注:示例中的 YOUR_URL 需替换为您要解析的具体视频或图集链接)
YOUR_URL
最多可创建 10 个密钥。推荐在正式生产项目中使用 Authorization 请求头传参。
推荐在正式生产项目中使用 Authorization 请求头传参。
GET {{ request.url_root }}api/v1/parse?url=YOUR_URL Authorization: Bearer mp_xxxxxxxxx
小白兼容写法(直接放入 URL 参数):
{{ request.url_root }}api/v1/parse?key=mp_xxxxxxxxx&url=YOUR_URL
💡 提示:YOUR_URL 代表您需要解析的目标视频或图集链接(例如:https://v.douyin.com/xxx)。程序代码中发起请求时,建议将 url 参数值进行 URL 编码(URL Encode)。
https://v.douyin.com/xxx
url