Mac下有極簡單的下載優酷視頻的辦法:
安裝Python3
到https://www.python.org/downloads/mac-osx/下載最新版Python 3,安裝
安裝Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
安裝ffmpeg
brew install ffmpeg
安裝you-get
pip3 install you-get
下載視頻
如
you-get 'http://v.youku.com/v_show/id_XNTc3OTY4MzU2.html?firsttime=78' --format=mp4
優酷、網易、騰訊、YouTube等都沒問題。前幾個直接下載即可,愛奇藝和YouTube要用一些特別的技術,具體如下:
下載愛奇藝視頻
查看可下載的視頻信息
you-get -i 'http://www.iqiyi.com/v_19rr96mr7w.html'
site: 愛奇藝 (Iqiyi)
title: A
streams: # Available quality and codecs
[ DEFAULT ] _________________________________
- format: TD
container: m3u8
video-profile: 720p
size: 0.0 MiB (0 bytes)
# download-with: you-get --format=TD [URL]
- format: HD
container: m3u8
video-profile: 540p
size: 0.0 MiB (0 bytes)
# download-with: you-get --format=HD [URL]
- format: SD
container: m3u8
video-profile: 360p
size: 0.0 MiB (0 bytes)
# download-with: you-get --format=SD [URL]
- format: LD
container: m3u8
video-profile: 210p
size: 0.0 MiB (0 bytes)
# download-with: you-get --format=LD [URL]
按提示用下面的命令下載:
you-get --format=TD 'http://www.iqiyi.com/v_19rr96mr7w.html'
下載YouTube視頻
安裝PySocks
pip install PySocks
查看可下載編號
you-get -i -s 127.0.0.1:1080 'https://www.youtube.com/watch?v=UEQe96RT5tQ'
下載:
you-get --itag=134 -s 127.0.0.1:1080 'https://www.youtube.com/watch?v=UEQe96RT5tQ