12345678910111213141516171819 |
- # -*- coding: utf-8 -*-
- # @Author : ChenZhaoyuchen
- # @Time : 2024/9/13 15:02
- # @File : Save_bili.py
- from setting import Audio_path,Audio_format,Video_format,Video_path
- from GetResponse import GetResponse_video,GetResponse_audio
- def Savevideo(title,video_url):
- video_content = GetResponse_video(url = video_url).content
- with open(Video_path + title + Video_format, mode='wb') as video:
- video.write(video_content)
- def Saveaudio(title,audio_url):
- audio_content = GetResponse_audio(url = audio_url).content
- with open(Audio_path + title + Audio_format, mode='wb') as audio:
- audio.write(audio_content)
|