Save_bili.py 577 B

1234567891011121314151617
  1. # -*- coding: utf-8 -*-
  2. # @Author : ChenZhaoyuchen
  3. # @Time : 2024/9/13 15:02
  4. # @File : Save_bili.py
  5. from .setting import Audio_path,Audio_format,Video_format,Video_path
  6. from .GetResponse import GetResponse
  7. def Save(title,audio_url,video_url):
  8. audio_content = GetResponse(url = audio_url).content
  9. video_content = GetResponse(url = video_url).content
  10. with open(Audio_path + title + Audio_format, mode='wb') as audio:
  11. audio.write(audio_content)
  12. with open(Video_path + title + Video_format, mode='wb') as video:
  13. video.write(video_content)