podflow 20250325__py3-none-any.whl → 20250326__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/message/get_youtube_and_bilibili_video_format.py +46 -30
- {podflow-20250325.dist-info → podflow-20250326.dist-info}/METADATA +2 -2
- {podflow-20250325.dist-info → podflow-20250326.dist-info}/RECORD +6 -6
- {podflow-20250325.dist-info → podflow-20250326.dist-info}/WHEEL +0 -0
- {podflow-20250325.dist-info → podflow-20250326.dist-info}/entry_points.txt +0 -0
- {podflow-20250325.dist-info → podflow-20250326.dist-info}/top_level.txt +0 -0
@@ -9,45 +9,59 @@ from Podflow.message.media_format import media_format
|
|
9
9
|
def one_format(id_update_format, id_num):
|
10
10
|
entry_id_update_format = id_update_format[0]
|
11
11
|
gVar.video_id_update_format[id_num]["url"] = entry_id_update_format["url"]
|
12
|
-
gVar.video_id_update_format[id_num]["format"] = entry_id_update_format[
|
12
|
+
gVar.video_id_update_format[id_num]["format"] = entry_id_update_format[
|
13
|
+
"duration_and_id"
|
14
|
+
]
|
13
15
|
gVar.video_id_update_format[id_num]["title"] = entry_id_update_format["title"]
|
14
|
-
gVar.video_id_update_format[id_num]["timestamp"] = entry_id_update_format[
|
15
|
-
|
16
|
+
gVar.video_id_update_format[id_num]["timestamp"] = entry_id_update_format[
|
17
|
+
"timestamp"
|
18
|
+
]
|
19
|
+
gVar.video_id_update_format[id_num]["description"] = entry_id_update_format[
|
20
|
+
"description"
|
21
|
+
]
|
16
22
|
gVar.video_id_update_format[id_num]["main"] = id_num
|
17
23
|
gVar.video_id_update_format[id_num]["image"] = entry_id_update_format["image"]
|
18
24
|
gVar.video_id_update_format[id_num]["download"] = entry_id_update_format["download"]
|
19
25
|
|
20
26
|
|
21
27
|
# YouTube&哔哩哔哩视频信息模块
|
22
|
-
def get_youtube_and_bilibili_video_format(
|
28
|
+
def get_youtube_and_bilibili_video_format(
|
29
|
+
id_num, stop_flag, video_format_lock, prepare_animation
|
30
|
+
):
|
31
|
+
url = gVar.video_id_update_format[id_num]["url"]
|
32
|
+
media = gVar.video_id_update_format[id_num]["media"]
|
33
|
+
quality = gVar.video_id_update_format[id_num]["quality"]
|
23
34
|
id_update_format = media_format(
|
24
|
-
|
35
|
+
url,
|
25
36
|
id_num,
|
26
|
-
|
27
|
-
|
37
|
+
media,
|
38
|
+
quality,
|
28
39
|
gVar.video_id_update_format[id_num]["cookie"],
|
29
40
|
)
|
30
|
-
|
31
|
-
|
32
|
-
if
|
33
|
-
gVar.
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
41
|
+
if "youtube" in url:
|
42
|
+
for fail_info in ["年龄限制", "需登录", "请求拒绝", "无法获取音频ID"]:
|
43
|
+
if fail_info in id_update_format:
|
44
|
+
if gVar.youtube_cookie:
|
45
|
+
gVar.video_id_update_format[id_num][
|
46
|
+
"cookie"
|
47
|
+
] = "channel_data/yt_dlp_youtube.txt"
|
48
|
+
id_update_format = media_format(
|
49
|
+
url,
|
50
|
+
id_num,
|
51
|
+
media,
|
52
|
+
quality,
|
53
|
+
gVar.video_id_update_format[id_num]["cookie"],
|
54
|
+
)
|
55
|
+
if fail_info in id_update_format:
|
56
|
+
id_update_format = f"\x1b[31m{fail_info}\x1b[0m(Cookies错误)"
|
57
|
+
else:
|
58
|
+
id_update_format = f"\x1b[31m{fail_info}\x1b[0m(需要Cookies)"
|
59
|
+
break
|
60
|
+
else:
|
61
|
+
if gVar.video_id_update_format[id_num]["power"] is True and (
|
62
|
+
"试看" in id_update_format or id_update_format == "无法获取音频ID"
|
49
63
|
):
|
50
|
-
|
64
|
+
id_update_format = "\x1b[31m充电专属\x1b[0m"
|
51
65
|
if isinstance(id_update_format, list):
|
52
66
|
if len(id_update_format) == 1:
|
53
67
|
one_format(id_update_format, id_num)
|
@@ -58,8 +72,8 @@ def get_youtube_and_bilibili_video_format(id_num, stop_flag, video_format_lock,
|
|
58
72
|
entrys_id.append(entry_id)
|
59
73
|
gVar.video_id_update_format[entry_id] = {
|
60
74
|
"id": gVar.video_id_update_format[id_num]["id"],
|
61
|
-
"media":
|
62
|
-
"quality":
|
75
|
+
"media": media,
|
76
|
+
"quality": quality,
|
63
77
|
"url": entry_id_update_format["url"],
|
64
78
|
"name": gVar.video_id_update_format[id_num]["name"],
|
65
79
|
"cookie": gVar.video_id_update_format[id_num]["cookie"],
|
@@ -70,7 +84,9 @@ def get_youtube_and_bilibili_video_format(id_num, stop_flag, video_format_lock,
|
|
70
84
|
"main": id_num,
|
71
85
|
"image": entry_id_update_format["image"],
|
72
86
|
"download": entry_id_update_format["download"],
|
73
|
-
"backward_update": gVar.video_id_update_format[id_num][
|
87
|
+
"backward_update": gVar.video_id_update_format[id_num][
|
88
|
+
"backward_update"
|
89
|
+
],
|
74
90
|
}
|
75
91
|
gVar.video_id_update_format[id_num] = entrys_id
|
76
92
|
else:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: podflow
|
3
|
-
Version:
|
3
|
+
Version: 20250326
|
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.26
|
18
18
|
Requires-Dist: chardet>=5.2.0
|
19
19
|
Requires-Dist: cherrypy>=18.10.0
|
20
20
|
Requires-Dist: pyqrcode>=1.2.1
|
@@ -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=gw6ufsx0u66lVmXP7kxDB7oShvZmdvZTFXVhCLXbiC8,4439
|
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
|
@@ -94,8 +94,8 @@ Podflow/youtube/__init__.py,sha256=-bdMyuw-wxoz2miVkp284amS4Qg0k7VN0JPuGF-cXlM,4
|
|
94
94
|
Podflow/youtube/build.py,sha256=o6gld4qMph7UKq9pdO2E4dmtOA8brCK4sa_-vKEtYMM,12006
|
95
95
|
Podflow/youtube/get.py,sha256=dFLyiHttygqdJltwC29jD_v8wwoLynE5NUdow_0wERI,16970
|
96
96
|
Podflow/youtube/login.py,sha256=DlS_ZG4g6CKWqS5ojE4UwFJSCSZDsXbeuDVgHtQAa4A,1380
|
97
|
-
podflow-
|
98
|
-
podflow-
|
99
|
-
podflow-
|
100
|
-
podflow-
|
101
|
-
podflow-
|
97
|
+
podflow-20250326.dist-info/METADATA,sha256=cZ3phpiS1IU9eoZkz8yKFPSDn_VMrWKzl9oTuEADeA8,14163
|
98
|
+
podflow-20250326.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
99
|
+
podflow-20250326.dist-info/entry_points.txt,sha256=44nj8jJB7bo1JLNrKQZmwMGEA1OalrALJ0tF_G0yXLY,131
|
100
|
+
podflow-20250326.dist-info/top_level.txt,sha256=KcvRCiz_DRWWc9i-PgpARvFB0J4CKmpZOZgPqOdG-Lk,8
|
101
|
+
podflow-20250326.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|