我正在尝试使用youtube-dl抓取youtube。我的目标是让它找到URL的缩略图并返回。不知道是否需要下载破折号。
这是我到目前为止的内容,但仍显示“ Download dash manafest”
from __future__ import unicode_literals
import youtube_dl
class MyLogger(object):
def debug(self, msg):
print msg
pass
def warning(self, msg):
print msg
pass
def error(self, msg):
print(msg)
def my_hook(d):
if d['status'] == 'finished':
print('Done downloading, now converting ...')
ydl_opts = {
'list_thumbnails:': True,
'--youtube-skip-dash-manifest':True,
'logger': MyLogger(),
'progress_hooks': [my_hook],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.extract_info('http://www.youtube.com/watch?v=BaW_jenozKc', download=False, process=False)
最佳答案
正确的选项是'youtube_include_dash_manifest': False
。
关于python - 跳过下载破折号 list ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32346214/