diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-09-25 04:45:31 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-09-25 04:45:31 +0600 |
commit | 9b166fc1f8039fe3f3632c40848ce590ade9f3fa (patch) | |
tree | 4f90cd7a0e7fa150e6e92a70d3156cb54baab1a3 /youtube_dl/extractor | |
parent | d4364f30bd39528b4da487799380737c330e88c5 (diff) |
[iconosquare] Extract comments
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/iconosquare.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/youtube_dl/extractor/iconosquare.py b/youtube_dl/extractor/iconosquare.py index bb69c7a0f..a39f422e9 100644 --- a/youtube_dl/extractor/iconosquare.py +++ b/youtube_dl/extractor/iconosquare.py @@ -62,6 +62,14 @@ class IconosquareIE(InfoExtractor): 'height': int_or_none(t.get('height')) } for thumbnail_id, t in media.get('images', {}).items()] + comments = [{ + 'id': comment.get('id'), + 'text': comment['text'], + 'timestamp': int_or_none(comment.get('created_time')), + 'author': comment.get('from', {}).get('full_name'), + 'author_id': comment.get('from', {}).get('username'), + } for comment in media.get('comments', {}).get('data', []) if 'text' in comment] + return { 'id': video_id, 'title': title, @@ -73,4 +81,5 @@ class IconosquareIE(InfoExtractor): 'comment_count': comment_count, 'like_count': like_count, 'formats': formats, + 'comments': comments, } |