podflow 20250323.1__py3-none-any.whl → 20250325__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Podflow/httpfs/app_bottle.py +14 -4
 - Podflow/httpfs/html.py +1 -1
 - Podflow/message/get_youtube_and_bilibili_video_format.py +1 -1
 - Podflow/upload/upload_server.py +17 -0
 - {podflow-20250323.1.dist-info → podflow-20250325.dist-info}/METADATA +2 -2
 - {podflow-20250323.1.dist-info → podflow-20250325.dist-info}/RECORD +9 -8
 - {podflow-20250323.1.dist-info → podflow-20250325.dist-info}/WHEEL +0 -0
 - {podflow-20250323.1.dist-info → podflow-20250325.dist-info}/entry_points.txt +0 -0
 - {podflow-20250323.1.dist-info → podflow-20250325.dist-info}/top_level.txt +0 -0
 
    
        Podflow/httpfs/app_bottle.py
    CHANGED
    
    | 
         @@ -3,6 +3,7 @@ 
     | 
|
| 
       3 
3 
     | 
    
         | 
| 
       4 
4 
     | 
    
         
             
            import os
         
     | 
| 
       5 
5 
     | 
    
         
             
            import hashlib
         
     | 
| 
      
 6 
     | 
    
         
            +
            import pkg_resources
         
     | 
| 
       6 
7 
     | 
    
         
             
            from datetime import datetime
         
     | 
| 
       7 
8 
     | 
    
         
             
            import cherrypy
         
     | 
| 
       8 
9 
     | 
    
         
             
            from bottle import Bottle, abort, redirect, request, static_file, response, template
         
     | 
| 
         @@ -38,6 +39,7 @@ class bottle_app: 
     | 
|
| 
       38 
39 
     | 
    
         
             
                        self.app_bottle.route("/upload", method="POST", callback=self.upload)
         
     | 
| 
       39 
40 
     | 
    
         
             
                    else:
         
     | 
| 
       40 
41 
     | 
    
         
             
                        # 设置其他路由,回调函数为serve_static
         
     | 
| 
      
 42 
     | 
    
         
            +
                        self.app_bottle.route("/try", method=["GET", "POST"], callback=self.try1)
         
     | 
| 
       41 
43 
     | 
    
         
             
                        self.app_bottle.route("/index", method=["GET", "POST"], callback=self.index)
         
     | 
| 
       42 
44 
     | 
    
         
             
                        self.app_bottle.route("/<filename:path>", callback=self.serve_static)
         
     | 
| 
       43 
45 
     | 
    
         | 
| 
         @@ -249,12 +251,14 @@ class bottle_app: 
     | 
|
| 
       249 
251 
     | 
    
         
             
                        }
         
     | 
| 
       250 
252 
     | 
    
         | 
| 
       251 
253 
     | 
    
         
             
                # 获取Channel-ID请求
         
     | 
| 
       252 
     | 
    
         
            -
                def index(self): 
     | 
| 
      
 254 
     | 
    
         
            +
                def index(self):
         
     | 
| 
       253 
255 
     | 
    
         
             
                    if request.method == "POST":
         
     | 
| 
       254 
256 
     | 
    
         
             
                        user_input = request.forms.get("inputOutput")  # 获取用户输入
         
     | 
| 
       255 
257 
     | 
    
         
             
                        processed_input = get_channelid(user_input)
         
     | 
| 
       256 
258 
     | 
    
         
             
                        self.print_out("channelid", 200)
         
     | 
| 
       257 
     | 
    
         
            -
                        return template( 
     | 
| 
      
 259 
     | 
    
         
            +
                        return template(
         
     | 
| 
      
 260 
     | 
    
         
            +
                            html_index, processed_input=processed_input
         
     | 
| 
      
 261 
     | 
    
         
            +
                        )  # 直接回显到输入框
         
     | 
| 
       258 
262 
     | 
    
         
             
                    else:
         
     | 
| 
       259 
263 
     | 
    
         
             
                        self.print_out("index", 200)
         
     | 
| 
       260 
264 
     | 
    
         
             
                        return template(html_index, processed_input="")  # 默认输入框为空
         
     | 
| 
         @@ -374,8 +378,7 @@ class bottle_app: 
     | 
|
| 
       374 
378 
     | 
    
         
             
                                            "filename": filename,
         
     | 
| 
       375 
379 
     | 
    
         
             
                                        },
         
     | 
| 
       376 
380 
     | 
    
         
             
                                    }
         
     | 
| 
       377 
     | 
    
         
            -
                                 
     | 
| 
       378 
     | 
    
         
            -
                                    num += 1
         
     | 
| 
      
 381 
     | 
    
         
            +
                                num += 1
         
     | 
| 
       379 
382 
     | 
    
         
             
                        else:
         
     | 
| 
       380 
383 
     | 
    
         
             
                            file_save(upload_file, filename, address)
         
     | 
| 
       381 
384 
     | 
    
         
             
                            # 打印成功信息并返回成功码
         
     | 
| 
         @@ -388,5 +391,12 @@ class bottle_app: 
     | 
|
| 
       388 
391 
     | 
    
         
             
                                },
         
     | 
| 
       389 
392 
     | 
    
         
             
                            }
         
     | 
| 
       390 
393 
     | 
    
         | 
| 
      
 394 
     | 
    
         
            +
                def try1(self):
         
     | 
| 
      
 395 
     | 
    
         
            +
                    # 使用pkg_resources获取模板文件路径
         
     | 
| 
      
 396 
     | 
    
         
            +
                    template_path = pkg_resources.resource_filename('Podflow', 'views/try.html')
         
     | 
| 
      
 397 
     | 
    
         
            +
                    with open(template_path, 'r') as f:
         
     | 
| 
      
 398 
     | 
    
         
            +
                        html_content = f.read()
         
     | 
| 
      
 399 
     | 
    
         
            +
                    return html_content
         
     | 
| 
      
 400 
     | 
    
         
            +
             
     | 
| 
       391 
401 
     | 
    
         | 
| 
       392 
402 
     | 
    
         
             
            bottle_app_instance = bottle_app()
         
     | 
    
        Podflow/httpfs/html.py
    CHANGED
    
    | 
         @@ -86,7 +86,7 @@ html_index = '''<!DOCTYPE html> 
     | 
|
| 
       86 
86 
     | 
    
         
             
                    <div class="button-container">
         
     | 
| 
       87 
87 
     | 
    
         
             
                        <button type="button" onclick="pasteFromClipboard()">📋 粘贴</button>
         
     | 
| 
       88 
88 
     | 
    
         
             
                        <button type="submit">✅ 提交</button>
         
     | 
| 
       89 
     | 
    
         
            -
                         
     | 
| 
      
 89 
     | 
    
         
            +
                        <button type="button" onclick="copyText()">📄 拷贝</button>
         
     | 
| 
       90 
90 
     | 
    
         
             
                        <button type="button" onclick="clearInput()">🗑️ 清空</button>
         
     | 
| 
       91 
91 
     | 
    
         
             
                    </div>
         
     | 
| 
       92 
92 
     | 
    
         
             
                    <p class="hint">📌 如果粘贴按钮无效,请长按输入框手动粘贴。</p>
         
     | 
| 
         @@ -27,7 +27,7 @@ def get_youtube_and_bilibili_video_format(id_num, stop_flag, video_format_lock, 
     | 
|
| 
       27 
27 
     | 
    
         
             
                    gVar.video_id_update_format[id_num]["quality"],
         
     | 
| 
       28 
28 
     | 
    
         
             
                    gVar.video_id_update_format[id_num]["cookie"],
         
     | 
| 
       29 
29 
     | 
    
         
             
                )
         
     | 
| 
       30 
     | 
    
         
            -
                for fail_info in ["年龄限制", "需登录", "请求拒绝"]:
         
     | 
| 
      
 30 
     | 
    
         
            +
                for fail_info in ["年龄限制", "需登录", "请求拒绝", "无法获取音频ID"]:
         
     | 
| 
       31 
31 
     | 
    
         
             
                    if fail_info in id_update_format:
         
     | 
| 
       32 
32 
     | 
    
         
             
                        if gVar.youtube_cookie:
         
     | 
| 
       33 
33 
     | 
    
         
             
                            gVar.video_id_update_format[id_num]["cookie"] = "channel_data/yt_dlp_youtube.txt"
         
     | 
| 
         @@ -0,0 +1,17 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # Podflow/upload/upload_server.py
         
     | 
| 
      
 2 
     | 
    
         
            +
            # coding: utf-8
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            import json
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            def get_uploads_original():
         
     | 
| 
      
 8 
     | 
    
         
            +
                try:
         
     | 
| 
      
 9 
     | 
    
         
            +
                    # 尝试打开并读取 JSON 文件
         
     | 
| 
      
 10 
     | 
    
         
            +
                    with open("channel_data/upload_server.json", "r") as file:
         
     | 
| 
      
 11 
     | 
    
         
            +
                        uploads_original = file.read()  # 读取原始上传数据
         
     | 
| 
      
 12 
     | 
    
         
            +
                    uploads_original = json.loads(
         
     | 
| 
      
 13 
     | 
    
         
            +
                        uploads_original
         
     | 
| 
      
 14 
     | 
    
         
            +
                    )  # 将读取的字符串转换为 Python 对象(列表或字典)
         
     | 
| 
      
 15 
     | 
    
         
            +
                except Exception:
         
     | 
| 
      
 16 
     | 
    
         
            +
                    # 如果读取或解析失败,将 upload_original 初始化为空列表
         
     | 
| 
      
 17 
     | 
    
         
            +
                    uploads_original = []
         
     | 
| 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            Metadata-Version: 2.1
         
     | 
| 
       2 
2 
     | 
    
         
             
            Name: podflow
         
     | 
| 
       3 
     | 
    
         
            -
            Version:  
     | 
| 
      
 3 
     | 
    
         
            +
            Version: 20250325
         
     | 
| 
       4 
4 
     | 
    
         
             
            Summary: A podcast server that includes YouTube and BiliBili
         
     | 
| 
       5 
5 
     | 
    
         
             
            Home-page: https://github.com/gruel-zxz/podflow
         
     | 
| 
       6 
6 
     | 
    
         
             
            Author: gruel_zxz
         
     | 
| 
         @@ -14,7 +14,7 @@ Requires-Python: >=3.8 
     | 
|
| 
       14 
14 
     | 
    
         
             
            Description-Content-Type: text/markdown
         
     | 
| 
       15 
15 
     | 
    
         
             
            Requires-Dist: astral>=3.2
         
     | 
| 
       16 
16 
     | 
    
         
             
            Requires-Dist: bottle>=0.13.2
         
     | 
| 
       17 
     | 
    
         
            -
            Requires-Dist: yt-dlp>=2025.3. 
     | 
| 
      
 17 
     | 
    
         
            +
            Requires-Dist: yt-dlp>=2025.3.25
         
     | 
| 
       18 
18 
     | 
    
         
             
            Requires-Dist: chardet>=5.2.0
         
     | 
| 
       19 
19 
     | 
    
         
             
            Requires-Dist: cherrypy>=18.10.0
         
     | 
| 
       20 
20 
     | 
    
         
             
            Requires-Dist: pyqrcode>=1.2.1
         
     | 
| 
         @@ -40,10 +40,10 @@ Podflow/download/show_progress.py,sha256=7oGzhj_frO2A1o5JeGuHn7bHtma5oPpD_IWcctI 
     | 
|
| 
       40 
40 
     | 
    
         
             
            Podflow/download/wait_animation.py,sha256=E2V3cm-10e5Iif40oU722OfzDe7YiLMbDqsjZ6dshBE,1056
         
     | 
| 
       41 
41 
     | 
    
         
             
            Podflow/download/youtube_and_bilibili_download.py,sha256=0uuEO2ybyLlg9uOButjqFvmIkCfq6xiQ7QLV2_u4c_M,1294
         
     | 
| 
       42 
42 
     | 
    
         
             
            Podflow/httpfs/__init__.py,sha256=agnAtd2Xe0qfOrElKgoBattAVqUBdj79wU2e2UOpcJM,45
         
     | 
| 
       43 
     | 
    
         
            -
            Podflow/httpfs/app_bottle.py,sha256= 
     | 
| 
      
 43 
     | 
    
         
            +
            Podflow/httpfs/app_bottle.py,sha256=Zqb-zVlKHKSLUsejzVskb9Jtpgwt4ELaBuBsEZLdpDw,16562
         
     | 
| 
       44 
44 
     | 
    
         
             
            Podflow/httpfs/browser.py,sha256=Omr8CHa6BB_pcMEfXeXEtWBgex_8KZ6mUUnDs0yMv6A,197
         
     | 
| 
       45 
45 
     | 
    
         
             
            Podflow/httpfs/get_channelid.py,sha256=870GOQWw4YsWi0zbpF4L6uGpHpk4Tp3DvlXGk3uV-pE,2296
         
     | 
| 
       46 
     | 
    
         
            -
            Podflow/httpfs/html.py,sha256= 
     | 
| 
      
 46 
     | 
    
         
            +
            Podflow/httpfs/html.py,sha256=2Jri7_jDlPVaBcuNfHPvQ9sgzMuiB0-WEQPLZT0Nu2o,4897
         
     | 
| 
       47 
47 
     | 
    
         
             
            Podflow/httpfs/port_judge.py,sha256=RrBTxD6lXHbkfiDMu69-EUv0kbflfu1HpPfpB5Wz3MU,764
         
     | 
| 
       48 
48 
     | 
    
         
             
            Podflow/makeup/__init__.py,sha256=HaBchKbUjRqqXSGCkMfEqLOyx3tlqB2htXvTDs59owI,45
         
     | 
| 
       49 
49 
     | 
    
         
             
            Podflow/makeup/del_makeup_format_fail.py,sha256=rUSJD5lXMBM5pCde1amrtF6s93MMHp66-NHCXZy56AI,642
         
     | 
| 
         @@ -60,7 +60,7 @@ Podflow/message/get_media_name.py,sha256=5a9Tuvsr7-jslJ8h3hH23Bh11mN6GcCQmHUQwvw 
     | 
|
| 
       60 
60 
     | 
    
         
             
            Podflow/message/get_original_rss.py,sha256=QRtpHEYeS9rDh4Cv_EkTIC89eSw0I6540ykrTT3yr-4,2383
         
     | 
| 
       61 
61 
     | 
    
         
             
            Podflow/message/get_video_format.py,sha256=RIX0fxuPYkoQPRWt-ulJPhfEWtMkyxwOEVqcuRsp4v8,4770
         
     | 
| 
       62 
62 
     | 
    
         
             
            Podflow/message/get_video_format_multithread.py,sha256=ZXzY9RwT59eOvP6Lmx-I07P3C1CWCl-4l_uw_pkozqE,1406
         
     | 
| 
       63 
     | 
    
         
            -
            Podflow/message/get_youtube_and_bilibili_video_format.py,sha256= 
     | 
| 
      
 63 
     | 
    
         
            +
            Podflow/message/get_youtube_and_bilibili_video_format.py,sha256=PWXvWpvR0qDqg0SVOTJ4ea0qxmsn5rTSbXFDedb06G0,4345
         
     | 
| 
       64 
64 
     | 
    
         
             
            Podflow/message/media_format.py,sha256=WH0NnjWPLigU8Wy2kbqDIhj_RISnaCCXtsR5qIjLFdU,7346
         
     | 
| 
       65 
65 
     | 
    
         
             
            Podflow/message/original_rss_fail_print.py,sha256=pVVb_BGM1HofHDh9pCX5GS03gOnNAssfHDjj5Ytz_mw,502
         
     | 
| 
       66 
66 
     | 
    
         
             
            Podflow/message/rss_create_hash.py,sha256=NODhtprDPkpiuiezupARKm5Xr4Zt2Io_lcxmHedPAQc,638
         
     | 
| 
         @@ -89,12 +89,13 @@ Podflow/upload/linked_server.py,sha256=_upOctwNxg7p82tDK1qIuMO8CTZiYoB6dI4wZ3G4A 
     | 
|
| 
       89 
89 
     | 
    
         
             
            Podflow/upload/login.py,sha256=8BciQddfs7xfmVl5PWYC54-TEt52NjPw3kU-ksFgfV8,4007
         
     | 
| 
       90 
90 
     | 
    
         
             
            Podflow/upload/time_key.py,sha256=aR6xVe9x7ry8dKSHKoFLSUIfor2CoCuv8N9NRmsnUVo,967
         
     | 
| 
       91 
91 
     | 
    
         
             
            Podflow/upload/update_upload.py,sha256=4B5HyWwfmc_4Z5ZS_Wt2VcL6sgQFvq3JEl0Qubh7TwE,3183
         
     | 
| 
      
 92 
     | 
    
         
            +
            Podflow/upload/upload_server.py,sha256=RK-Q_qST-HUHSJp8V4r7XYb20rvA1gYHF3rxK2mE2eU,565
         
     | 
| 
       92 
93 
     | 
    
         
             
            Podflow/youtube/__init__.py,sha256=-bdMyuw-wxoz2miVkp284amS4Qg0k7VN0JPuGF-cXlM,46
         
     | 
| 
       93 
94 
     | 
    
         
             
            Podflow/youtube/build.py,sha256=o6gld4qMph7UKq9pdO2E4dmtOA8brCK4sa_-vKEtYMM,12006
         
     | 
| 
       94 
95 
     | 
    
         
             
            Podflow/youtube/get.py,sha256=dFLyiHttygqdJltwC29jD_v8wwoLynE5NUdow_0wERI,16970
         
     | 
| 
       95 
96 
     | 
    
         
             
            Podflow/youtube/login.py,sha256=DlS_ZG4g6CKWqS5ojE4UwFJSCSZDsXbeuDVgHtQAa4A,1380
         
     | 
| 
       96 
     | 
    
         
            -
            podflow- 
     | 
| 
       97 
     | 
    
         
            -
            podflow- 
     | 
| 
       98 
     | 
    
         
            -
            podflow- 
     | 
| 
       99 
     | 
    
         
            -
            podflow- 
     | 
| 
       100 
     | 
    
         
            -
            podflow- 
     | 
| 
      
 97 
     | 
    
         
            +
            podflow-20250325.dist-info/METADATA,sha256=yv_g2HHYtdJ_xlL1qB2fskUq7XKFEw5b5tw_3C9o7iw,14163
         
     | 
| 
      
 98 
     | 
    
         
            +
            podflow-20250325.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
         
     | 
| 
      
 99 
     | 
    
         
            +
            podflow-20250325.dist-info/entry_points.txt,sha256=44nj8jJB7bo1JLNrKQZmwMGEA1OalrALJ0tF_G0yXLY,131
         
     | 
| 
      
 100 
     | 
    
         
            +
            podflow-20250325.dist-info/top_level.txt,sha256=KcvRCiz_DRWWc9i-PgpARvFB0J4CKmpZOZgPqOdG-Lk,8
         
     | 
| 
      
 101 
     | 
    
         
            +
            podflow-20250325.dist-info/RECORD,,
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     |