【发布时间】:2017-03-10 21:09:08
【问题描述】:
我对 python 很陌生,我想知道如何才能打印 maxres 缩略图,而不是从字面上看视频的所有内容。对不起,如果答案有点明显,我对 python 和一般编程有点陌生。
from apiclient.discovery import build
DEVELOPER_KEY = 'xxxxxx'
youtube = build('youtube', 'v3', developerKey=DEVELOPER_KEY)
ids = '6Gw-RyTRMns'
results = youtube.videos().list(id=ids, part='snippet').execute()
for result in results.get('items', []):
print(results)
我还想知道是否有一种方法可以从给定视频的描述中获取图片的 URL 并将其保存到文件夹中。
【问题讨论】: