-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Instagram] Extract comments #10788
[Instagram] Extract comments #10788
Conversation
@@ -0,0 +1 @@ | |||
{"http_headers": {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)", "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-us,en;q=0.5", "Accept-Encoding": "gzip, deflate"}, "playlist_index": null, "webpage_url_basename": "BKhrorNBKyV", "description": "@kingsofleon with my favourite people \ud83d\udcf9\ud83d\udca5\ud83d\udc99\ud83d\udc99\ud83d\udc99@dimitribasil @laura_go_run @soopercooper_", "format_id": "0", "extractor": "Instagram", "comment_count": 26, "display_id": "BKhrorNBKyV", "format": "0 - unknown", "_filename": "Video by carolinemonteithwilson-BKhrorNBKyV.mp4", "webpage_url": "https://www.instagram.com/p/BKhrorNBKyV/?taken-by=carolinemonteithwilson", "id": "BKhrorNBKyV", "title": "Video by carolinemonteithwilson", "thumbnails": [{"url": "https://scontent-amt2-1.cdninstagram.com/t51.2885-15/s1080x1080/e15/fr/14280457_305399146494488_2085348421_n.jpg?ig_cache_key=MTM0MjU0NjA3NTEwMTQ3Mzk0MQ%3D%3D.2", "id": "0"}], "uploader_id": "carolinemonteithwilson", "protocol": "https", "timestamp": 1474263985, "extractor_key": "Instagram", "ext": "mp4", "upload_date": "20160919", "thumbnail": "https://scontent-amt2-1.cdninstagram.com/t51.2885-15/s1080x1080/e15/fr/14280457_305399146494488_2085348421_n.jpg?ig_cache_key=MTM0MjU0NjA3NTEwMTQ3Mzk0MQ%3D%3D.2", "url": "https://scontent-amt2-1.cdninstagram.com/t50.2886-16/14406433_1764201343843456_1242211862_n.mp4", "uploader": "carolinemonteithwilson", "playlist": null, "fulltitle": "Video by carolinemonteithwilson", "like_count": 216} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidentally commited?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
f1e19d5
to
3ae8e8c
Compare
'id': comment.get('id'), | ||
'text': comment.get('text'), | ||
'timestamp': int_or_none(comment.get('created_at')), | ||
} for comment in media.get('comments', {}).get('nodes', {})] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a _TEST
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated previous test cases. Is that ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks.
a8eb6f5
to
bfb08ac
Compare
'author': comment.get('user', {}).get('username'), | ||
'author_id': comment.get('user', {}).get('id'), | ||
'id': comment.get('id'), | ||
'text': comment.get('text'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either text
or html
is mandatory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
bfb08ac
to
a56e74e
Compare
Merged thanks! |
Please follow the guide below
x
into all the boxes [ ] relevant to your pull request (like that [x])Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information
This adds support for comments extraction for Instagram