[問題]想寫個批次將Youtube影片轉成mp3的程式

看板Python作者 (不下棋)時間11年前 (2014/06/08 15:53), 編輯推噓1(103)
留言4則, 3人參與, 最新討論串1/7 (看更多)
小弟會點C/C++ 最近想將Youtube上有些音樂合輯的影片 利用程式"批次"自動轉成mp3檔,本來是一首一首用複製的 沒寫過這方面的程式,不曉得如果要這樣做的話該如何寫呢? 合輯影片 https://www.youtube.com/watch?v=xWN3gZ3H0gA&feature=youtu.be
Youtube轉mp3檔 http://www.youtube-mp3.org/ 不好意思小弟沒用過Python,不過看起來是要使用python寫的youtube-dl去使用會比較好 我作業系統是Win7 32bit,我去下載了Python3.4.1 GUI和youtube-dl 不過該如何才能用youtube-dl呢? 我將下載的youtube-dl放在C:\Python34 進入Python3.4.1 GUI打 import youtube-dl出現SyntaxError: invalid syntax錯誤 將檔名改為youtube_dl後打import youtube_dl又出現錯誤, 請問該如何使用呢? >>> import youtube-dl SyntaxError: invalid syntax >>> import youtube_dl Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> import youtube_dl ImportError: No module named 'youtube_dl' -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.46.15.150 ※ 文章網址: http://www.ptt.cc/bbs/Python/M.1402242818.A.7A6.html

06/09 01:34, , 1F
youtube_dl.py ?
06/09 01:34, 1F

06/09 08:48, , 2F
打開你的命令提示字元輸入 pip install youtube_dl
06/09 08:48, 2F

06/09 11:29, , 3F
shell的ffmpeg就做得到了
06/09 11:29, 3F

06/09 11:30, , 4F
喔…還要從youtube上載…那還是用python好了XDD
06/09 11:30, 4F
文章代碼(AID): #1Jb8S2Uc (Python)
討論串 (同標題文章)
文章代碼(AID): #1Jb8S2Uc (Python)