ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.28k stars 9.94k forks source link

License & attribution: add license and link to uploader's page to output dict #8712

Closed zhuyifei1999 closed 8 years ago

zhuyifei1999 commented 8 years ago

With a random CC-BY licensed YouTube video such as https://www.youtube.com/watch?v=M4gD1WSo5mA, neither the uploader's page, nor the license is mentioned in the output dict:

$ python
Python 2.7.9 (default, Mar  1 2015, 12:57:24) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import youtube_dl
>>> params = {
...     'format': 'bestvideo+bestaudio/best',
...     'outtmpl': '/dev/null',
...     'writedescription': True,
...     'writeinfojson': True,
...     'writesubtitles': False,
...     'subtitlesformat': 'srt/ass/vtt/best',
...     'cachedir': '/tmp/',
...     'noplaylist': True,
...     'verbose': True
... }
>>> info = youtube_dl.YoutubeDL(params).extract_info('https://www.youtube.com/watch?v=M4gD1WSo5mA', download=False)
WARNING: Parameter outtmpl is bytes, but should be a unicode string. Put  from __future__ import unicode_literals  at the top of your code file or consider switching to Python 3.x.
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.02.22
[debug] Python version 2.7.9 - Linux-3.16.0-4-amd64-x86_64-with-debian-8.3
[debug] exe versions: ffmpeg 2.8.4-1, ffprobe 2.8.4-1
[debug] Proxy map: {}
[youtube] M4gD1WSo5mA: Downloading webpage
[youtube] M4gD1WSo5mA: Downloading video info webpage
[youtube] M4gD1WSo5mA: Extracting video information
[youtube] M4gD1WSo5mA: Downloading MPD manifest
>>> info
{u'upload_date': u'20150127', u'creator': None, u'height': 1080, u'like_count': 4, u'duration': 721, u'id': 'M4gD1WSo5mA', u'requested_formats': (<irrelevant data removed>), u'view_count': 1654, u'playlist': None, u'title': u'William Fisher, CopyrightX: Lecture 3.2, The Subject Matter of Copyright: Drama and choreography', u'format': u'137 - 1920x1080 (DASH video)+141 - audio only (DASH audio)', u'ext': u'mp4', u'playlist_index': None, u'dislike_count': 1, u'average_rating': 4.19999980927, u'abr': 256, u'categories': [u'Education'], u'fps': 24, u'stretched_ratio': None, u'age_limit': 0, u'annotations': None, u'webpage_url_basename': u'watch', u'acodec': u'mp4a.40.2', u'display_id': 'M4gD1WSo5mA', u'automatic_captions': {}, u'description': u'The terms on which this lecture may be used or modified are available at http://copyx.org/permission.\n\nThe lecture was prepared for a Harvard Law School course on Copyright Law, and for the CopyrightX course, offered under the auspices of HarvardX. Information concerning both courses can be found at http://copyx.org.', u'tags': [u'Copyright (Legal Subject)', u'Law (Industry)', u'William W. Fisher (Author)'], u'requested_subtitles': None, u'start_time': None, u'uploader': u'BerkmanCenter', u'format_id': u'137+141', u'uploader_id': u'BerkmanCenter', u'subtitles': {}, u'thumbnails': [{u'url': u'https://i.ytimg.com/vi/M4gD1WSo5mA/maxresdefault.jpg', u'id': u'0'}], u'alt_title': None, u'extractor_key': u'Youtube', u'vcodec': u'avc1.640028', u'thumbnail': u'https://i.ytimg.com/vi/M4gD1WSo5mA/maxresdefault.jpg', u'vbr': None, u'is_live': None, u'extractor': u'youtube', u'end_time': None, u'webpage_url': u'https://www.youtube.com/watch?v=M4gD1WSo5mA', u'formats': [<irrelevant data removed>], u'resolution': None, u'width': 1920}
>>> 
dstftw commented 8 years ago

Both are not supposed to be mentioned. If this is a feature request create an issue per request.

zhuyifei1999 commented 8 years ago

Yes, this is a feature request. You mean to split this ticket?