Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -22,15 +22,15 @@ def get_video_info(html_url):
|
|
22 |
return audio_url, video_url
|
23 |
|
24 |
def save_audio(title, html_url):
|
25 |
-
audio_url = get_video_info(html_url)[0]
|
26 |
video_url = get_video_info(html_url)[1]
|
27 |
|
28 |
-
audio_content = get_response(audio_url).content
|
29 |
video_content = get_response(video_url).content
|
30 |
|
31 |
-
with open(title + '.mp3', mode='wb') as f:
|
32 |
-
|
33 |
-
print("音乐内容保存完成")
|
34 |
with open(title + '.mp4', mode='wb') as f:
|
35 |
f.write(video_content)
|
36 |
print("视频内容保存完成")
|
|
|
22 |
return audio_url, video_url
|
23 |
|
24 |
def save_audio(title, html_url):
|
25 |
+
#audio_url = get_video_info(html_url)[0]
|
26 |
video_url = get_video_info(html_url)[1]
|
27 |
|
28 |
+
#audio_content = get_response(audio_url).content
|
29 |
video_content = get_response(video_url).content
|
30 |
|
31 |
+
#with open(title + '.mp3', mode='wb') as f:
|
32 |
+
# f.write(audio_content)
|
33 |
+
#print("音乐内容保存完成")
|
34 |
with open(title + '.mp4', mode='wb') as f:
|
35 |
f.write(video_content)
|
36 |
print("视频内容保存完成")
|