{"action":"created","comment":{"url":"https://api.github.com/repos/rg3/youtube-dl/pulls/comments/219701310","pull_request_review_id":157941632,"id":219701310,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTcwMTMxMA==","diff_hunk":"@@ -0,0 +1,56 @@\n+# coding: utf-8\n+from __future__ import unicode_literals\n+\n+from .common import InfoExtractor\n+from ..compat import compat_urllib_parse_urlencode\n+from ..utils import ExtractorError, int_or_none\n+\n+\n+class SnapchatStoryIE(InfoExtractor):\n+    _VALID_URL = r'https?://(story|play)\\.snapchat\\.com/(?:s/)?(?P<id>[^/?#&]+)'\n+    _TEST = {\n+        'url': 'https://story.snapchat.com/s/m:W7_EDlXWTBiXAEEniNoMPwAAYHNdO123IQ281AWXc-zodAWXc-ziUAHanAA',\n+        'md5': '3eebf8f327752d100959db3fa0879bfb',\n+        'info_dict': {\n+            'id': 'W7_EDlXWTBiXAEEniNoMPwAAYHNdO123IQ281AWXc-zodAWXc-ziUAHanAA',\n+            'ext': 'mp4',\n+            'title': 'Dunn, North Carolina',\n+            'thumbnail': 'https://s.sc-cdn.net/N_FHqfPfsuaDG2vf33HsmA4ipcDtMBuW5SM3dBiME38=/default/preview_overlay.jpg',\n+        },\n+    }\n+\n+    def _raise_not_expected_format():\n+        raise ExtractorError('Data not in expected format')\n+\n+    def _real_extract(self, url):\n+        snap_id = self._match_id(url)\n+        data_url = 'https://storysharing.snapchat.com/v1/fetch/%s' % snap_id\n+        data = self._download_json(data_url,\n+                                   snap_id,\n+                                   query=dict(request_origin='ORIGIN_WEB_PLAYER'))\n+\n+        if 'story' not in data:\n+            self._raise_not_expected_format()\n+        story = data['story']\n+        if 'metadata' not in story or 'snaps' not in story:\n+            self._raise_not_expected_format()","path":"youtube_dl/extractor/snapchat.py","position":36,"original_position":36,"commit_id":"0313a296932b209da2afd82f88d071d93e588da5","original_commit_id":"0313a296932b209da2afd82f88d071d93e588da5","user":{"login":"dstftw","id":1908898,"node_id":"MDQ6VXNlcjE5MDg4OTg=","avatar_url":"https://avatars2.githubusercontent.com/u/1908898?v=4","gravatar_id":"","url":"https://api.github.com/users/dstftw","html_url":"https://github.com/dstftw","followers_url":"https://api.github.com/users/dstftw/followers","following_url":"https://api.github.com/users/dstftw/following{/other_user}","gists_url":"https://api.github.com/users/dstftw/gists{/gist_id}","starred_url":"https://api.github.com/users/dstftw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstftw/subscriptions","organizations_url":"https://api.github.com/users/dstftw/orgs","repos_url":"https://api.github.com/users/dstftw/repos","events_url":"https://api.github.com/users/dstftw/events{/privacy}","received_events_url":"https://api.github.com/users/dstftw/received_events","type":"User","site_admin":false},"body":"Remove.","created_at":"2018-09-23T14:51:10Z","updated_at":"2018-09-23T14:52:06Z","html_url":"https://github.com/rg3/youtube-dl/pull/17631#discussion_r219701310","pull_request_url":"https://api.github.com/repos/rg3/youtube-dl/pulls/17631","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/rg3/youtube-dl/pulls/comments/219701310"},"html":{"href":"https://github.com/rg3/youtube-dl/pull/17631#discussion_r219701310"},"pull_request":{"href":"https://api.github.com/repos/rg3/youtube-dl/pulls/17631"}}},"pull_request":{"url":"https://api.github.com/repos/rg3/youtube-dl/pulls/17631","id":217438644,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NDM4NjQ0","html_url":"https://github.com/rg3/youtube-dl/pull/17631","diff_url":"https://github.com/rg3/youtube-dl/pull/17631.diff","patch_url":"https://github.com/rg3/youtube-dl/pull/17631.patch","issue_url":"https://api.github.com/repos/rg3/youtube-dl/issues/17631","number":17631,"state":"open","locked":false,"title":"[SnapchatStory] Add new extractor","user":{"login":"Tatsh","id":724848,"node_id":"MDQ6VXNlcjcyNDg0OA==","avatar_url":"https://avatars2.githubusercontent.com/u/724848?v=4","gravatar_id":"","url":"https://api.github.com/users/Tatsh","html_url":"https://github.com/Tatsh","followers_url":"https://api.github.com/users/Tatsh/followers","following_url":"https://api.github.com/users/Tatsh/following{/other_user}","gists_url":"https://api.github.com/users/Tatsh/gists{/gist_id}","starred_url":"https://api.github.com/users/Tatsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tatsh/subscriptions","organizations_url":"https://api.github.com/users/Tatsh/orgs","repos_url":"https://api.github.com/users/Tatsh/repos","events_url":"https://api.github.com/users/Tatsh/events{/privacy}","received_events_url":"https://api.github.com/users/Tatsh/received_events","type":"User","site_admin":false},"body":"## Please follow the guide below\r\n\r\n- You will be asked some questions, please read them **carefully** and answer honestly\r\n- Put an `x` into all the boxes [ ] relevant to your *pull request* (like that [x])\r\n- Use *Preview* tab to see how your *pull request* will actually look like\r\n\r\n---\r\n\r\n### Before submitting a *pull request* make sure you have:\r\n- [x] At least skimmed through [adding new extractor tutorial](https://github.com/rg3/youtube-dl#adding-support-for-a-new-site) and [youtube-dl coding conventions](https://github.com/rg3/youtube-dl#youtube-dl-coding-conventions) sections\r\n- [x] [Searched](https://github.com/rg3/youtube-dl/search?q=is%3Apr&type=Issues) the bugtracker for similar pull requests\r\n- [x] Checked the code with [flake8](https://pypi.python.org/pypi/flake8)\r\n\r\n### In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under [Unlicense](http://unlicense.org/). Check one of the following options:\r\n- [ ] I am the original author of this code and I am willing to release it under [Unlicense](http://unlicense.org/)\r\n- [ ] I am not the original author of this code but it is in public domain or released under [Unlicense](http://unlicense.org/) (provide reliable evidence)\r\n\r\n### What is the purpose of your *pull request*?\r\n- [ ] Bug fix\r\n- [ ] Improvement\r\n- [x] New extractor\r\n- [ ] New feature\r\n\r\n---\r\n\r\n### Description of your *pull request* and other information\r\n\r\nAdd new extractor for Snapchat stories in [the web player](https://story.snapchat.com/s/khloekardashian).","created_at":"2018-09-22T04:30:37Z","updated_at":"2018-09-23T14:52:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c77d903aad9093834a4d076a17756edb5d2de3c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rg3/youtube-dl/pulls/17631/commits","review_comments_url":"https://api.github.com/repos/rg3/youtube-dl/pulls/17631/comments","review_comment_url":"https://api.github.com/repos/rg3/youtube-dl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rg3/youtube-dl/issues/17631/comments","statuses_url":"https://api.github.com/repos/rg3/youtube-dl/statuses/0313a296932b209da2afd82f88d071d93e588da5","head":{"label":"Tatsh:snapchat-story","ref":"snapchat-story","sha":"0313a296932b209da2afd82f88d071d93e588da5","user":{"login":"Tatsh","id":724848,"node_id":"MDQ6VXNlcjcyNDg0OA==","avatar_url":"https://avatars2.githubusercontent.com/u/724848?v=4","gravatar_id":"","url":"https://api.github.com/users/Tatsh","html_url":"https://github.com/Tatsh","followers_url":"https://api.github.com/users/Tatsh/followers","following_url":"https://api.github.com/users/Tatsh/following{/other_user}","gists_url":"https://api.github.com/users/Tatsh/gists{/gist_id}","starred_url":"https://api.github.com/users/Tatsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tatsh/subscriptions","organizations_url":"https://api.github.com/users/Tatsh/orgs","repos_url":"https://api.github.com/users/Tatsh/repos","events_url":"https://api.github.com/users/Tatsh/events{/privacy}","received_events_url":"https://api.github.com/users/Tatsh/received_events","type":"User","site_admin":false},"repo":{"id":144976146,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ5NzYxNDY=","name":"youtube-dl","full_name":"Tatsh/youtube-dl","private":false,"owner":{"login":"Tatsh","id":724848,"node_id":"MDQ6VXNlcjcyNDg0OA==","avatar_url":"https://avatars2.githubusercontent.com/u/724848?v=4","gravatar_id":"","url":"https://api.github.com/users/Tatsh","html_url":"https://github.com/Tatsh","followers_url":"https://api.github.com/users/Tatsh/followers","following_url":"https://api.github.com/users/Tatsh/following{/other_user}","gists_url":"https://api.github.com/users/Tatsh/gists{/gist_id}","starred_url":"https://api.github.com/users/Tatsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tatsh/subscriptions","organizations_url":"https://api.github.com/users/Tatsh/orgs","repos_url":"https://api.github.com/users/Tatsh/repos","events_url":"https://api.github.com/users/Tatsh/events{/privacy}","received_events_url":"https://api.github.com/users/Tatsh/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Tatsh/youtube-dl","description":"Command-line program to download videos from YouTube.com and other video sites","fork":true,"url":"https://api.github.com/repos/Tatsh/youtube-dl","forks_url":"https://api.github.com/repos/Tatsh/youtube-dl/forks","keys_url":"https://api.github.com/repos/Tatsh/youtube-dl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tatsh/youtube-dl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tatsh/youtube-dl/teams","hooks_url":"https://api.github.com/repos/Tatsh/youtube-dl/hooks","issue_events_url":"https://api.github.com/repos/Tatsh/youtube-dl/issues/events{/number}","events_url":"https://api.github.com/repos/Tatsh/youtube-dl/events","assignees_url":"https://api.github.com/repos/Tatsh/youtube-dl/assignees{/user}","branches_url":"https://api.github.com/repos/Tatsh/youtube-dl/branches{/branch}","tags_url":"https://api.github.com/repos/Tatsh/youtube-dl/tags","blobs_url":"https://api.github.com/repos/Tatsh/youtube-dl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tatsh/youtube-dl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tatsh/youtube-dl/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tatsh/youtube-dl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tatsh/youtube-dl/statuses/{sha}","languages_url":"https://api.github.com/repos/Tatsh/youtube-dl/languages","stargazers_url":"https://api.github.com/repos/Tatsh/youtube-dl/stargazers","contributors_url":"https://api.github.com/repos/Tatsh/youtube-dl/contributors","subscribers_url":"https://api.github.com/repos/Tatsh/youtube-dl/subscribers","subscription_url":"https://api.github.com/repos/Tatsh/youtube-dl/subscription","commits_url":"https://api.github.com/repos/Tatsh/youtube-dl/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tatsh/youtube-dl/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tatsh/youtube-dl/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tatsh/youtube-dl/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tatsh/youtube-dl/contents/{+path}","compare_url":"https://api.github.com/repos/Tatsh/youtube-dl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tatsh/youtube-dl/merges","archive_url":"https://api.github.com/repos/Tatsh/youtube-dl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tatsh/youtube-dl/downloads","issues_url":"https://api.github.com/repos/Tatsh/youtube-dl/issues{/number}","pulls_url":"https://api.github.com/repos/Tatsh/youtube-dl/pulls{/number}","milestones_url":"https://api.github.com/repos/Tatsh/youtube-dl/milestones{/number}","notifications_url":"https://api.github.com/repos/Tatsh/youtube-dl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tatsh/youtube-dl/labels{/name}","releases_url":"https://api.github.com/repos/Tatsh/youtube-dl/releases{/id}","deployments_url":"https://api.github.com/repos/Tatsh/youtube-dl/deployments","created_at":"2018-08-16T11:00:27Z","updated_at":"2018-09-22T03:56:28Z","pushed_at":"2018-09-22T04:49:37Z","git_url":"git://github.com/Tatsh/youtube-dl.git","ssh_url":"git@github.com:Tatsh/youtube-dl.git","clone_url":"https://github.com/Tatsh/youtube-dl.git","svn_url":"https://github.com/Tatsh/youtube-dl","homepage":"http://rg3.github.io/youtube-dl/","size":52211,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"unlicense","name":"The Unlicense","spdx_id":"Unlicense","url":"https://api.github.com/licenses/unlicense","node_id":"MDc6TGljZW5zZTE1"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rg3:master","ref":"master","sha":"4ac73fc170f41ccb2d468a0b8563b2ec39d9e9b9","user":{"login":"rg3","id":53487,"node_id":"MDQ6VXNlcjUzNDg3","avatar_url":"https://avatars0.githubusercontent.com/u/53487?v=4","gravatar_id":"","url":"https://api.github.com/users/rg3","html_url":"https://github.com/rg3","followers_url":"https://api.github.com/users/rg3/followers","following_url":"https://api.github.com/users/rg3/following{/other_user}","gists_url":"https://api.github.com/users/rg3/gists{/gist_id}","starred_url":"https://api.github.com/users/rg3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rg3/subscriptions","organizations_url":"https://api.github.com/users/rg3/orgs","repos_url":"https://api.github.com/users/rg3/repos","events_url":"https://api.github.com/users/rg3/events{/privacy}","received_events_url":"https://api.github.com/users/rg3/received_events","type":"User","site_admin":false},"repo":{"id":1039520,"node_id":"MDEwOlJlcG9zaXRvcnkxMDM5NTIw","name":"youtube-dl","full_name":"rg3/youtube-dl","private":false,"owner":{"login":"rg3","id":53487,"node_id":"MDQ6VXNlcjUzNDg3","avatar_url":"https://avatars0.githubusercontent.com/u/53487?v=4","gravatar_id":"","url":"https://api.github.com/users/rg3","html_url":"https://github.com/rg3","followers_url":"https://api.github.com/users/rg3/followers","following_url":"https://api.github.com/users/rg3/following{/other_user}","gists_url":"https://api.github.com/users/rg3/gists{/gist_id}","starred_url":"https://api.github.com/users/rg3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rg3/subscriptions","organizations_url":"https://api.github.com/users/rg3/orgs","repos_url":"https://api.github.com/users/rg3/repos","events_url":"https://api.github.com/users/rg3/events{/privacy}","received_events_url":"https://api.github.com/users/rg3/received_events","type":"User","site_admin":false},"html_url":"https://github.com/rg3/youtube-dl","description":"Command-line program to download videos from YouTube.com and other video sites","fork":false,"url":"https://api.github.com/repos/rg3/youtube-dl","forks_url":"https://api.github.com/repos/rg3/youtube-dl/forks","keys_url":"https://api.github.com/repos/rg3/youtube-dl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rg3/youtube-dl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rg3/youtube-dl/teams","hooks_url":"https://api.github.com/repos/rg3/youtube-dl/hooks","issue_events_url":"https://api.github.com/repos/rg3/youtube-dl/issues/events{/number}","events_url":"https://api.github.com/repos/rg3/youtube-dl/events","assignees_url":"https://api.github.com/repos/rg3/youtube-dl/assignees{/user}","branches_url":"https://api.github.com/repos/rg3/youtube-dl/branches{/branch}","tags_url":"https://api.github.com/repos/rg3/youtube-dl/tags","blobs_url":"https://api.github.com/repos/rg3/youtube-dl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rg3/youtube-dl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rg3/youtube-dl/git/refs{/sha}","trees_url":"https://api.github.com/repos/rg3/youtube-dl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rg3/youtube-dl/statuses/{sha}","languages_url":"https://api.github.com/repos/rg3/youtube-dl/languages","stargazers_url":"https://api.github.com/repos/rg3/youtube-dl/stargazers","contributors_url":"https://api.github.com/repos/rg3/youtube-dl/contributors","subscribers_url":"https://api.github.com/repos/rg3/youtube-dl/subscribers","subscription_url":"https://api.github.com/repos/rg3/youtube-dl/subscription","commits_url":"https://api.github.com/repos/rg3/youtube-dl/commits{/sha}","git_commits_url":"https://api.github.com/repos/rg3/youtube-dl/git/commits{/sha}","comments_url":"https://api.github.com/repos/rg3/youtube-dl/comments{/number}","issue_comment_url":"https://api.github.com/repos/rg3/youtube-dl/issues/comments{/number}","contents_url":"https://api.github.com/repos/rg3/youtube-dl/contents/{+path}","compare_url":"https://api.github.com/repos/rg3/youtube-dl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rg3/youtube-dl/merges","archive_url":"https://api.github.com/repos/rg3/youtube-dl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rg3/youtube-dl/downloads","issues_url":"https://api.github.com/repos/rg3/youtube-dl/issues{/number}","pulls_url":"https://api.github.com/repos/rg3/youtube-dl/pulls{/number}","milestones_url":"https://api.github.com/repos/rg3/youtube-dl/milestones{/number}","notifications_url":"https://api.github.com/repos/rg3/youtube-dl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rg3/youtube-dl/labels{/name}","releases_url":"https://api.github.com/repos/rg3/youtube-dl/releases{/id}","deployments_url":"https://api.github.com/repos/rg3/youtube-dl/deployments","created_at":"2010-10-31T14:35:07Z","updated_at":"2018-09-23T14:36:02Z","pushed_at":"2018-09-23T14:34:48Z","git_url":"git://github.com/rg3/youtube-dl.git","ssh_url":"git@github.com:rg3/youtube-dl.git","clone_url":"https://github.com/rg3/youtube-dl.git","svn_url":"https://github.com/rg3/youtube-dl","homepage":"http://rg3.github.io/youtube-dl/","size":53631,"stargazers_count":41927,"watchers_count":41927,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":7359,"mirror_url":null,"archived":false,"open_issues_count":2397,"license":{"key":"unlicense","name":"The Unlicense","spdx_id":"Unlicense","url":"https://api.github.com/licenses/unlicense","node_id":"MDc6TGljZW5zZTE1"},"forks":7359,"open_issues":2397,"watchers":41927,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rg3/youtube-dl/pulls/17631"},"html":{"href":"https://github.com/rg3/youtube-dl/pull/17631"},"issue":{"href":"https://api.github.com/repos/rg3/youtube-dl/issues/17631"},"comments":{"href":"https://api.github.com/repos/rg3/youtube-dl/issues/17631/comments"},"review_comments":{"href":"https://api.github.com/repos/rg3/youtube-dl/pulls/17631/comments"},"review_comment":{"href":"https://api.github.com/repos/rg3/youtube-dl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rg3/youtube-dl/pulls/17631/commits"},"statuses":{"href":"https://api.github.com/repos/rg3/youtube-dl/statuses/0313a296932b209da2afd82f88d071d93e588da5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dstftw"}}