projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d4364f3
)
[iconosquare] Extract comments
author
Sergey M․
<dstftw@gmail.com>
Thu, 24 Sep 2015 22:45:31 +0000
(
04:45
+0600)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 24 Sep 2015 22:45:31 +0000
(
04:45
+0600)
youtube_dl/extractor/iconosquare.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/iconosquare.py
b/youtube_dl/extractor/iconosquare.py
index bb69c7a0fb9c53500236d229601a44066d848459..a39f422e985bf4c97ac63b28418317d7288c85ca 100644
(file)
--- 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()]
'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,
return {
'id': video_id,
'title': title,
@@
-73,4
+81,5
@@
class IconosquareIE(InfoExtractor):
'comment_count': comment_count,
'like_count': like_count,
'formats': formats,
'comment_count': comment_count,
'like_count': like_count,
'formats': formats,
+ 'comments': comments,
}
}