Re: [問題]想寫個批次將Youtube影片轉成mp3的程式 已刪文

看板Python作者 (Neisseria)時間11年前 (2014/06/09 14:36), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/7 (看更多)
※ 引述《wu110011 (不下棋)》之銘言: : 小弟會點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又出現錯誤, : 請問該如何使用呢? youtube-dl 是設計成在終端機使用的指令,類似 Win 的 cd 或 dir 等指令 而不是當成函式庫使用,所以不太需要 import youtube_dl 當然,如果要批次下載及轉檔,是可以另外寫 Python script 去轉檔 而把 youtube-dl 當成一個指令就好 : SyntaxError: invalid syntax : Traceback (most recent call last): : File "<pyshell#1>", line 1, in <module> : import youtube_dl : ImportError: No module named 'youtube_dl' 如果以這樣的訊息看起來,youtube-dl 似乎沒有安裝成功 再試著重新安裝看看 youtube-dl 官網有提供 Win 底下的 exe 檔,或許可以試用看看 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 211.74.79.199 ※ 文章網址: http://www.ptt.cc/bbs/Python/M.1402324580.A.1E8.html
文章代碼(AID): #1JbSPa7e (Python)
討論串 (同標題文章)
本文引述了以下文章的的內容:
以下文章回應了本文
完整討論串 (本文為第 2 之 7 篇):
文章代碼(AID): #1JbSPa7e (Python)