podflow 20250404__py3-none-any.whl → 20250404.1__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.
@@ -2,11 +2,11 @@
2
2
  # coding: utf-8
3
3
 
4
4
  import os
5
- from datetime import datetime
6
5
  import ffmpeg
7
6
  import yt_dlp
8
7
  from podflow import gVar
9
8
  from podflow.basic.write_log import write_log
9
+ from podflow.basic.time_print import time_print
10
10
  from podflow.basic.get_duration import get_duration
11
11
  from podflow.download.show_progress import show_progress
12
12
  from podflow.message.fail_message_initialize import fail_message_initialize
@@ -36,7 +36,7 @@ def download_video(
36
36
 
37
37
  def error(self, msg):
38
38
  msg = fail_message_initialize(msg, video_url).ljust(48)
39
- print(msg)
39
+ time_print(msg, Time=False)
40
40
 
41
41
  outtmpl = f"channel_audiovisual/{output_dir}/{video_url}{sesuffix}.{output_format}"
42
42
  ydl_opts = {
@@ -215,15 +215,21 @@ def dl_aideo_video(
215
215
  print_message = (
216
216
  "\033[34m开始下载\033[0m 🍪" if cookies else "\033[34m开始下载\033[0m"
217
217
  )
218
- print(
219
- f"{datetime.now().strftime('%H:%M:%S')}|{video_write_log} {print_message}",
220
- end="",
218
+ time_print(
219
+ f"{video_write_log} {print_message}",
220
+ NoEnter=True,
221
221
  )
222
222
  if output_format == "m4a":
223
223
  if video_format[1] in ["140", "30280"]:
224
- print("")
224
+ time_print(
225
+ "",
226
+ Time=False,
227
+ )
225
228
  else:
226
- print(f" \033[97m{video_format[1]}\033[0m")
229
+ time_print(
230
+ f" \033[97m{video_format[1]}\033[0m",
231
+ Time=False,
232
+ )
227
233
  video_id_failed = dl_retry_video(
228
234
  video_url,
229
235
  output_dir,
@@ -238,8 +244,12 @@ def dl_aideo_video(
238
244
  playlist_num,
239
245
  )
240
246
  else:
241
- print(
242
- f"\n{datetime.now().strftime('%H:%M:%S')}|\033[34m视频部分开始下载\033[0m \033[97m{video_format[2]}\033[0m"
247
+ time_print(
248
+ "",
249
+ Time=False,
250
+ )
251
+ time_print(
252
+ f"\033[34m视频部分开始下载\033[0m \033[97m{video_format[2]}\033[0m",
243
253
  )
244
254
  video_id_failed = dl_retry_video(
245
255
  video_url,
@@ -255,8 +265,8 @@ def dl_aideo_video(
255
265
  playlist_num,
256
266
  )
257
267
  if video_id_failed is None:
258
- print(
259
- f"{datetime.now().strftime('%H:%M:%S')}|\033[34m音频部分开始下载\033[0m \033[97m{video_format[1]}\033[0m"
268
+ time_print(
269
+ f"\033[34m音频部分开始下载\033[0m \033[97m{video_format[1]}\033[0m",
260
270
  )
261
271
  video_id_failed = dl_retry_video(
262
272
  video_url,
@@ -272,9 +282,9 @@ def dl_aideo_video(
272
282
  playlist_num,
273
283
  )
274
284
  if video_id_failed is None:
275
- print(
276
- f"{datetime.now().strftime('%H:%M:%S')}|\033[34m开始合成...\033[0m",
277
- end="",
285
+ time_print(
286
+ "\033[34m开始合成...\033[0m",
287
+ NoEnter=True,
278
288
  )
279
289
  # 指定视频文件和音频文件的路径
280
290
  video_file = f"channel_audiovisual/{output_dir}/{video_url}.part.mp4"
@@ -288,14 +298,21 @@ def dl_aideo_video(
288
298
  audio, video, output_file, vcodec="copy", acodec="copy"
289
299
  )
290
300
  ffmpeg.run(stream, quiet=True)
291
- print(" \033[32m合成成功\033[0m")
301
+ time_print(
302
+ " \033[32m合成成功\033[0m",
303
+ Time=False
304
+ )
292
305
  # 删除临时文件
293
306
  os.remove(f"channel_audiovisual/{output_dir}/{video_url}.part.mp4")
294
307
  os.remove(f"channel_audiovisual/{output_dir}/{video_url}.part.m4a")
295
308
  except ffmpeg.Error as dl_aideo_video_error:
296
309
  video_id_failed = video_url
310
+ time_print(
311
+ "",
312
+ Time=False,
313
+ )
297
314
  write_log(
298
- f"\n{video_write_log} \033[31m下载失败\033[0m\n错误信息: 合成失败:{dl_aideo_video_error}"
315
+ f"{video_write_log} \033[31m下载失败\033[0m\n错误信息: 合成失败:{dl_aideo_video_error}"
299
316
  )
300
317
  if video_id_failed is None:
301
318
  if output_format == "m4a":
@@ -27,7 +27,7 @@ def wait_animation(stop_flag, wait_animation_display_info):
27
27
  time.sleep(0.5)
28
28
  elif stop_flag[0] == "error":
29
29
  time_print(
30
- f"{prepare_youtube_print}|{wait_animation_display_info}\033[34m准备中{animation} \033[31m失败:\033[0m",
30
+ f"{prepare_youtube_print}|{wait_animation_display_info}\033[34m准备中{animation}\033[0m \033[31m失败:\033[0m",
31
31
  Top=True,
32
32
  Time=False,
33
33
  )
@@ -11,6 +11,7 @@ from podflow import gVar
11
11
  from podflow.upload.login import create
12
12
  from podflow.basic.file_save import file_save
13
13
  from podflow.basic.write_log import write_log
14
+ from podflow.httpfs.to_html import ansi_to_html
14
15
  from podflow.upload.build_hash import build_hash
15
16
  from podflow.upload.time_key import check_time_key
16
17
  from podflow.httpfs.get_channelid import get_channelid
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: podflow
3
- Version: 20250404
3
+ Version: 20250404.1
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
@@ -35,12 +35,12 @@ podflow/config/get_config.py,sha256=TpLbh5GoPO7csWUJ-di65XXnkN3LSnMXkFw85h5ndHs,
35
35
  podflow/download/__init__.py,sha256=1lATXiOAEx5oDUDR99mQRiTrQlQ9CQkJNAKpsLrnPCo,47
36
36
  podflow/download/convert_bytes.py,sha256=6Q3TcPGzCO2FlhOKWbp9RB_GPmfuyKY5suIyE9EJf6k,543
37
37
  podflow/download/delete_part.py,sha256=wjY6WulpUMjLx38on0kTLXj0gA04rIuKAdwFidZtWGU,679
38
- podflow/download/dl_aideo_video.py,sha256=KKs8EpS3NI_sBMHr-QCAtoq6aGnoRXrqVU07KyLEHlg,10057
38
+ podflow/download/dl_aideo_video.py,sha256=LxA_Nt51ZG2MaIyVOi5CyDH7PA-EONxxAVW1wO8i4vE,10344
39
39
  podflow/download/show_progress.py,sha256=cWlyIh6WqoH3s4WpFSyL6xtiXhQFbrVJVcckxO-1NLg,1595
40
- podflow/download/wait_animation.py,sha256=SbdtpY4QzTOxGKX93kSde3syj88dTOzrJMJkkCiS1Yc,1307
40
+ podflow/download/wait_animation.py,sha256=AUTvszXF89QA7XYjocFIauPKV7Qj8cFqry44teClaLQ,1314
41
41
  podflow/download/youtube_and_bilibili_download.py,sha256=dlUh9cPHrYgZAhtXlBUOdFIpZOhv9xOtgdcTaqUvLuY,1294
42
42
  podflow/httpfs/__init__.py,sha256=BxEXkufjcx-a0F7sDVXo65hmyANqCCbZUd6EH9i8T2c,45
43
- podflow/httpfs/app_bottle.py,sha256=FU3LpdEDGXhEb-fHRWIk1WYgywKN3FSQAKECdJ68RNA,16797
43
+ podflow/httpfs/app_bottle.py,sha256=xslFhq0GW9Q6QEioRRkqs0UuGcdI2qVhMyCGZZtxJw4,16845
44
44
  podflow/httpfs/browser.py,sha256=BJ4Xkfiki_tDr0Sc9RqAcEfIVpkAZ3RFOwo0aMHlY3U,197
45
45
  podflow/httpfs/get_channelid.py,sha256=gcwy4IVHBWNQz7qPCpjwiAklGFLRGzvM33-UZz7oFvo,2296
46
46
  podflow/httpfs/port_judge.py,sha256=l_nLpsSiIhAzfJGCOWyYC-KkCCWPUW2ybe_5hdMOEzE,764
@@ -95,8 +95,8 @@ podflow/youtube/__init__.py,sha256=pgXod8gq0IijZxIkPSwgAOcb9JI5rd1mqMomoR7bcJ4,4
95
95
  podflow/youtube/build.py,sha256=3LYk_ICVXj9XkE9jZ8jEVI8596xxS_QZkcoIwcBE3Ys,12006
96
96
  podflow/youtube/get.py,sha256=Of7PRgUknhpyW70nvyVAUYVb5KyFViKiBTfH3Y6Mke8,16970
97
97
  podflow/youtube/login.py,sha256=KYl--ya6Z1u0uIcOp9l8i3DIIj9hsYUDH4dtJjI0MLM,1295
98
- podflow-20250404.dist-info/METADATA,sha256=ok3yBOEgUM0TH_2sqwBGRjZONW-qaaEjNQCRR42L9ds,14163
99
- podflow-20250404.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
100
- podflow-20250404.dist-info/entry_points.txt,sha256=mn7hD_c_dmpKe3XU0KNekheBvD01LhlJ9htY-Df0j2A,131
101
- podflow-20250404.dist-info/top_level.txt,sha256=fUujhhz-RrMI8aGvi-3Ey5y7FQnpOOgoFw9OWM3yLCU,8
102
- podflow-20250404.dist-info/RECORD,,
98
+ podflow-20250404.1.dist-info/METADATA,sha256=RPYAiLB81ussdErIcCXHnzOkMT8mDehpd2iHVK7DhCo,14165
99
+ podflow-20250404.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
100
+ podflow-20250404.1.dist-info/entry_points.txt,sha256=mn7hD_c_dmpKe3XU0KNekheBvD01LhlJ9htY-Df0j2A,131
101
+ podflow-20250404.1.dist-info/top_level.txt,sha256=fUujhhz-RrMI8aGvi-3Ey5y7FQnpOOgoFw9OWM3yLCU,8
102
+ podflow-20250404.1.dist-info/RECORD,,