<!DOCTYPE HTML>
<html lang="zh-Hans-CN">
<head>
    <title>TikTokDownloader</title>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
    <link rel="shortcut icon" href="static/images/TikTokDownloader.ico">
    <link rel="stylesheet" href="static/css/main.css"/>
    <link rel="stylesheet" href="static/css/index.css"/>
    <noscript>
        <link rel="stylesheet" href="static/css/noscript.css"/>
    </noscript>
</head>
<body class="is-preload">

<section id="sidebar">
    <div class="inner">
        <nav>
            <ul>
                <li><a href="#index">欢迎使用</a></li>
                <li><a href="#settings">参数配置</a></li>
                <li><a href="#single">作品下载</a></li>
                <li><a href="#live">直播提取</a></li>
            </ul>
        </nav>
    </div>
</section>

<div id="wrapper">

    <section id="index" class="wrapper style1 fullscreen fade-up">
        <div class="inner">
            <div class="box alt">
                <div class="row gtr-uniform">
                    <div class="col-4"><span class="image fit"><img src="static/images/TikTokDownloader.png"
                                                                    alt="TikTokDownloader"/></span>
                    </div>
                    <h1 id="title" class="col-6">TikTokDownloader</h1>
                </div>
            </div>
            <p><b>TikTok 主页/视频/图集/原声；抖音主页/视频/图集/收藏/直播/原声/合集/评论/账号/搜索/热榜数据采集工具：</b>完全开源，基于
                Requests 模块实现的免费工具；批量下载抖音账号发布、喜欢、收藏作品；批量下载 TikTok 账号主页作品；下载抖音链接或
                TikTok 链接作品；获取抖音直播推流地址；下载抖音直播视频；采集抖音作品评论数据；批量下载抖音合集作品；采集抖音账号详细数据；采集抖音用户
                / 作品 / 直播搜索结果；采集抖音热榜数据。</p>
            <p>
                <b>
                    在使用本项目的代码和功能之前，请您认真考虑并接受本项目的免责声明。如果您对本项目的声明有任何疑问或不同意，请不要使用本项目的代码和功能。如果您使用了本项目的代码和功能，则视为您已完全理解并接受本项目的免责声明，并自愿承担使用本项目的一切风险和后果。
                </b>
            </p>
            <ul class="actions">
                <li>
                    <a href="https://github.com/JoeanAmier/TikTokDownloader#%EF%B8%8F-%E5%85%8D%E8%B4%A3%E5%A3%B0%E6%98%8Edisclaimers"
                       class="button scrolly"
                       target="_blank">查看免责声明</a>
                </li>
                <li><a href="https://github.com/JoeanAmier/TikTokDownloader/wiki/Documentation"
                       class="button scrolly"
                       target="_blank">查看项目文档</a>
                </li>
                <li><a href="https://github.com/JoeanAmier/TikTokDownloader/releases/latest" class="button scrolly"
                       target="_blank">最新 Releases</a>
                </li>
            </ul>
        </div>
    </section>

    <section id="settings" class="wrapper style2 spotlights">
        <div class="inner">
            <h2>参数配置</h2>
            <div class="style1">
                <section>
                    <form onsubmit="return false">
                        <div class="fields">
                            <div class="field half">
                                <label for="root">根目录(root)</label>
                                <label>
                                    <input type="text" id="root" value="{{ root }}"/>
                                </label>
                            </div>
                            <div class="field half">
                                <label for="name_format">文件名称格式(name_format)</label>
                                <label>
                                    <input type="text" id="name_format" value="{{ name_format }}"/>
                                </label>
                            </div>
                            <div class="field quarter">
                                <label for="storage_format">数据保存格式(storage_format)</label>
                                <select name="storage_format" id="storage_format">
                                    <option value="" {% if storage_format == '' %}selected="selected"{% endif %}>
                                        不保存
                                    </option>
                                    <option value="csv" {% if storage_format == 'csv' %}selected="selected"{% endif %}>
                                        CSV
                                    </option>
                                    <option value="xlsx"
                                            {% if storage_format == 'xlsx' %}selected="selected"{% endif %}>XLSX
                                    </option>
                                    <option value="sql" {% if storage_format == 'sql' %}selected="selected"{% endif %}>
                                        SQLite
                                    </option>
                                </select>
                            </div>
                            <div class="field quarter">
                                <label for="run_command">默认执行命令(run_command)</label>
                                <label>
                                    <input type="text" id="run_command" value="{{ run_command }}"/>
                                </label>
                            </div>
                            <div class="field quarter">
                                <label for="folder_name">保存文件夹名称(folder_name)</label>
                                <label>
                                    <input type="text" id="folder_name" value="{{ folder_name }}"/>
                                </label>
                            </div>
                            <div class="field quarter">
                                <label for="date_format">日期时间格式(date_format)</label>
                                <label>
                                    <input type="text" id="date_format" value="{{ date_format }}"/>
                                </label>
                            </div>
                            <div class="field quarter">
                                <label for="split">文件名称分隔符(split)</label>
                                <label>
                                    <input type="text" id="split" value="{{ split }}"/>
                                </label>
                            </div>
                            <div class="field quarter">
                                <label for="max_retry">最大重试次数(max_retry)</label>
                                <label>
                                    <input type="text" id="max_retry" value="{{ max_retry }}"/>
                                </label>
                            </div>
                            <div class="field quarter">
                                <label for="max_pages">最大请求次数(max_pages)</label>
                                <label>
                                    <input type="text" id="max_pages" value="{{ max_pages }}"/>
                                </label>
                            </div>
                            <div class="field quarter">
                                <label for="max_size">最大文件限制(max_size)</label>
                                <label>
                                    <input type="text" id="max_size" value="{{ max_size }}"/>
                                </label>
                            </div>
                            <div class="field quarter">
                                <label for="chunk">数据块大小(chunk)</label>
                                <label>
                                    <input type="text" id="chunk" value="{{ chunk }}"/>
                                </label>
                            </div>
                            <div class="field quarter">
                                <label for="cookie">Cookie（直接粘贴）</label>
                                <label>
                                    <input type="text" id="cookie" value="" placeholder="未修改"/>
                                </label>
                            </div>
                            <div class="field quarter">
                                <label for="proxies">代理设置(proxies)</label>
                                <label>
                                    <input type="text" id="proxies" value="{{ proxies }}"/>
                                </label>
                            </div>
                            <div class="field quarter">
                                <label for="ffmpeg">ffmpeg.exe 路径(ffmpeg)</label>
                                <label>
                                    <input type="text" id="ffmpeg" value="{{ ffmpeg }}"/>
                                </label>
                            </div>
                        </div>
                        <div class="fields">
                            <div class="field quarter">
                                <input type="checkbox" id="music" name="music" {% if music %}checked{% endif %}>
                                <label for="music">下载作品原声</label>
                            </div>
                            <div class="field quarter">
                                <input type="checkbox" id="dynamic_cover" name="dynamic_cover"
                                       {% if dynamic_cover %}checked{% endif %}>
                                <label for="dynamic_cover">下载动态封面图</label>
                            </div>
                            <div class="field quarter">
                                <input type="checkbox" id="original_cover" name="original_cover"
                                       {% if original_cover %}checked{% endif %}>
                                <label for="original_cover">下载静态封面图</label>
                            </div>
                            <div class="field quarter">
                                <input type="checkbox" id="folder_mode" name="folder_mode"
                                       {% if folder_mode %}checked{% endif %}>
                                <label for="folder_mode">作品文件夹归档模式</label>
                            </div>
                            <div class="field quarter">
                                <input type="checkbox" id="download" name="download"
                                       {% if download %}checked{% endif %}>
                                <label for="download">启用下载功能</label>
                            </div>
                        </div>
                        <ul class="actions">
                            <li><input type="button" class="button submit" value="保存配置并重新加载页面"
                                       onclick="update_parameters()">
                            </li>
                        </ul>
                    </form>
                </section>
            </div>
        </div>
    </section>

    <section id="single" class="wrapper style1 spotlights">
        <div class="inner">
            <h2>作品下载</h2>
            <div class="style1">
                <section>
                    <form id="single_form" onsubmit="return false">
                        <div class="fields">
                            <div class="field half">
                                <label for="single_url">请输入抖音 / TikTok 作品链接：</label>
                                <label>
                                    <input type="text" id="single_url"/>
                                </label>
                                <br>
                                <ul class="actions">
                                    <li><input type="button" class="button submit" value="读取剪贴板并粘贴至输入框"
                                               onclick="single_input()">
                                    </li>
                                </ul>
                                <ul class="actions">
                                    <li><input type="button" class="button submit" value="获取下载链接"
                                               onclick="single_post()"></li>
                                    <li><input type="button" class="button submit" value="后台下载作品"
                                               onclick="single_post(true)" {% if not download %} disabled {% endif %}>
                                    </li>
                                </ul>
                                <label for="single_state">运行结果：</label>
                                <input id="single_state" type="text" readonly>
                                <br>
                                <ul class="actions">
                                    <li><input type="button" class="button submit" value="下载视频"
                                               onclick="get_download()" id="download_url">
                                    </li>
                                    <li><input type="button" class="button submit" value="下载静态封面"
                                               onclick="get_origin()" id="origin_url">
                                    </li>
                                </ul>
                                <ul class="actions">
                                    <li><input type="button" class="button submit" value="下载原声"
                                               onclick="get_music()" id="music_url">
                                    </li>
                                    <li><input type="button" class="button submit" value="下载动态封面"
                                               onclick="get_dynamic()" id="dynamic_url">
                                    </li>
                                </ul>
                                <ul class="actions">
                                    <li><input type="button" class="button submit" value="显示/隐藏图集下载地址"
                                               onclick="get_images()" id="images_url">
                                    </li>
                                </ul>
                                <div id="single_url_text" style="display: none;">
                                </div>
                            </div>
                            <div class="field half">
                                <label>作品预览：</label>
                                <span class="image fit" id="preview"><img
                                        id="single_preview"
                                        src="{{ preview }}"
                                        alt="预览图"/></span>
                            </div>
                        </div>
                    </form>
                </section>
            </div>
        </div>
    </section>

    <section id="live" class="wrapper style2 spotlights">
        <div class="inner">
            <h2>直播提取</h2>
            <div class="style1">
                <section>
                    <form id="live_form" onsubmit="return false">
                        <div class="fields">
                            <div class="field half">
                                <label for="live_url">请输入抖音直播链接：</label>
                                <label>
                                    <input type="text" id="live_url"/>
                                </label>
                                <br>
                                <ul class="actions">
                                    <li><input type="button" class="button submit" value="读取剪贴板并粘贴至输入框"
                                               onclick="live_input()"></li>
                                </ul>
                                <ul class="actions">
                                    <li><input type="button" class="button submit" value="提取直播推流地址"
                                               onclick="live_post()">
                                    </li>
                                </ul>
                                <label for="live_state">运行结果：</label>
                                <textarea id="live_state" rows="3" readonly></textarea>
                                <br>
                                <ul class="actions">
                                    <li><input type="button" class="button submit" value="显示/隐藏全部推流地址"
                                               onclick="get_all()" id="all_url">
                                    </li>
                                </ul>
                                <ul class="actions">
                                    <li><input type="button" class="button submit" value="下载最高画质视频"
                                               onclick="get_best()" id="best_url">
                                    </li>
                                </ul>
                                <div id="live_url_text" style="display: none;">
                                </div>
                            </div>
                            <div class="field half">
                                <label>直播封面：</label>
                                <span class="image fit" id="preview"><img
                                        id="live_preview"
                                        src="{{ preview }}"
                                        alt="预览图"/></span>
                            </div>
                        </div>
                    </form>
                </section>
            </div>
        </div>
    </section>

</div>

<footer id="footer" class="wrapper style1-alt">
    <div class="inner">
        <ul class="menu">
            <li>开源项目: <a href="https://github.com/JoeanAmier/TikTokDownloader" target="_blank">TikTokDownloader</a>
            </li>
            <li>开源协议: <a href="https://github.com/JoeanAmier/TikTokDownloader/blob/master/license" target="_blank">GNU
                General Public License v3.0</a></li>
        </ul>
    </div>
</footer>

<script src="static/js/jquery.min.js"></script>
<script src="static/js/jquery.scrollex.min.js"></script>
<script src="static/js/jquery.scrolly.min.js"></script>
<script src="static/js/browser.min.js"></script>
<script src="static/js/breakpoints.min.js"></script>
<script src="static/js/util.js"></script>
<script src="static/js/main.js"></script>
<script src="static/js/index.js"></script>

</body>
</html>
