如何解决找不到 Pytube 路径
我不确定为什么此代码适用于某些视频,但有时我会收到此错误。 错误是:
MoviePy error: the file /Users/xxx/xxxxx/xxxxxx).mp4 could not be found!
我的代码:
def convertSong(self):
try:
MP4 = "{}{}.mp4".format(self.MP4_path,self.title)
MP3 = MP4.replace("mp4","mp3")
videoclip = VideoFileClip(MP4)
audioclip = videoclip.audio
audioclip.write_audiofile(MP3)
audioclip.close()
videoclip.close()
except Exception as e:
print("Exception!!")
print(e)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。