{"action":"created","comment":{"url":"https://api.github.com/repos/SAAVY/magpie/pulls/comments/35220358","id":35220358,"diff_hunk":"@@ -11,33 +15,51 @@\n class YoutubeMetadata(Metadata):\n \n     def fetch_site_data(self, sanitized_url, status_code):\n-        request_url = youtube_request_url + sanitized_url\n-        return self.generic_fetch_content(request_url, status_code)\n+        api_url = youtube_request_url + sanitized_url\n+        response = self.generic_fetch_content(sanitized_url, status_code)\n+\n+        api_response = self.generic_fetch_content(api_url, status_code)\n+        if api_response.status_code is StatusCode.OK:\n+            response.set_api_content(api_response.content)\n+            response.status_code = api_response.status_code\n+            response.api_url = api_url\n+\n+        return response\n \n     def parse_content(self, response):\n         \"\"\"\n         The youtube metadata parse_content does not call generic_parse_content, since the response is a JSON object","path":"client/scraper/youtube_metadata.py","position":31,"original_position":31,"commit_id":"b4c57eb1c53a5a9b3d925f3b11c7c32a60162a16","original_commit_id":"b4c57eb1c53a5a9b3d925f3b11c7c32a60162a16","user":{"login":"AliceYuan","id":1325382,"avatar_url":"https://avatars.githubusercontent.com/u/1325382?v=3","gravatar_id":"","url":"https://api.github.com/users/AliceYuan","html_url":"https://github.com/AliceYuan","followers_url":"https://api.github.com/users/AliceYuan/followers","following_url":"https://api.github.com/users/AliceYuan/following{/other_user}","gists_url":"https://api.github.com/users/AliceYuan/gists{/gist_id}","starred_url":"https://api.github.com/users/AliceYuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AliceYuan/subscriptions","organizations_url":"https://api.github.com/users/AliceYuan/orgs","repos_url":"https://api.github.com/users/AliceYuan/repos","events_url":"https://api.github.com/users/AliceYuan/events{/privacy}","received_events_url":"https://api.github.com/users/AliceYuan/received_events","type":"User","site_admin":false},"body":"jokes nvm\r\n","created_at":"2015-07-22T14:44:37Z","updated_at":"2015-07-22T14:44:37Z","html_url":"https://github.com/SAAVY/magpie/pull/72#discussion_r35220358","pull_request_url":"https://api.github.com/repos/SAAVY/magpie/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/SAAVY/magpie/pulls/comments/35220358"},"html":{"href":"https://github.com/SAAVY/magpie/pull/72#discussion_r35220358"},"pull_request":{"href":"https://api.github.com/repos/SAAVY/magpie/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/SAAVY/magpie/pulls/72","id":40527127,"html_url":"https://github.com/SAAVY/magpie/pull/72","diff_url":"https://github.com/SAAVY/magpie/pull/72.diff","patch_url":"https://github.com/SAAVY/magpie/pull/72.patch","issue_url":"https://api.github.com/repos/SAAVY/magpie/issues/72","number":72,"state":"open","locked":false,"title":"resolves issue with media url return data","user":{"login":"AliceYuan","id":1325382,"avatar_url":"https://avatars.githubusercontent.com/u/1325382?v=3","gravatar_id":"","url":"https://api.github.com/users/AliceYuan","html_url":"https://github.com/AliceYuan","followers_url":"https://api.github.com/users/AliceYuan/followers","following_url":"https://api.github.com/users/AliceYuan/following{/other_user}","gists_url":"https://api.github.com/users/AliceYuan/gists{/gist_id}","starred_url":"https://api.github.com/users/AliceYuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AliceYuan/subscriptions","organizations_url":"https://api.github.com/users/AliceYuan/orgs","repos_url":"https://api.github.com/users/AliceYuan/repos","events_url":"https://api.github.com/users/AliceYuan/events{/privacy}","received_events_url":"https://api.github.com/users/AliceYuan/received_events","type":"User","site_admin":false},"body":"adds new api_query_url field for api queries\r\nadded try catch for checking for api response\r\nyoutube now does both api and scraping of header for content\r\nresolves issue: #71 ","created_at":"2015-07-22T03:25:30Z","updated_at":"2015-07-22T14:44:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5653de71a9b5c3832b1313517637dc6bc3e6d672","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SAAVY/magpie/pulls/72/commits","review_comments_url":"https://api.github.com/repos/SAAVY/magpie/pulls/72/comments","review_comment_url":"https://api.github.com/repos/SAAVY/magpie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SAAVY/magpie/issues/72/comments","statuses_url":"https://api.github.com/repos/SAAVY/magpie/statuses/b4c57eb1c53a5a9b3d925f3b11c7c32a60162a16","head":{"label":"SAAVY:new_key_fields_youtube","ref":"new_key_fields_youtube","sha":"b4c57eb1c53a5a9b3d925f3b11c7c32a60162a16","user":{"login":"SAAVY","id":12940854,"avatar_url":"https://avatars.githubusercontent.com/u/12940854?v=3","gravatar_id":"","url":"https://api.github.com/users/SAAVY","html_url":"https://github.com/SAAVY","followers_url":"https://api.github.com/users/SAAVY/followers","following_url":"https://api.github.com/users/SAAVY/following{/other_user}","gists_url":"https://api.github.com/users/SAAVY/gists{/gist_id}","starred_url":"https://api.github.com/users/SAAVY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SAAVY/subscriptions","organizations_url":"https://api.github.com/users/SAAVY/orgs","repos_url":"https://api.github.com/users/SAAVY/repos","events_url":"https://api.github.com/users/SAAVY/events{/privacy}","received_events_url":"https://api.github.com/users/SAAVY/received_events","type":"Organization","site_admin":false},"repo":{"id":35959425,"name":"magpie","full_name":"SAAVY/magpie","owner":{"login":"SAAVY","id":12940854,"avatar_url":"https://avatars.githubusercontent.com/u/12940854?v=3","gravatar_id":"","url":"https://api.github.com/users/SAAVY","html_url":"https://github.com/SAAVY","followers_url":"https://api.github.com/users/SAAVY/followers","following_url":"https://api.github.com/users/SAAVY/following{/other_user}","gists_url":"https://api.github.com/users/SAAVY/gists{/gist_id}","starred_url":"https://api.github.com/users/SAAVY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SAAVY/subscriptions","organizations_url":"https://api.github.com/users/SAAVY/orgs","repos_url":"https://api.github.com/users/SAAVY/repos","events_url":"https://api.github.com/users/SAAVY/events{/privacy}","received_events_url":"https://api.github.com/users/SAAVY/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SAAVY/magpie","description":"","fork":false,"url":"https://api.github.com/repos/SAAVY/magpie","forks_url":"https://api.github.com/repos/SAAVY/magpie/forks","keys_url":"https://api.github.com/repos/SAAVY/magpie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SAAVY/magpie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SAAVY/magpie/teams","hooks_url":"https://api.github.com/repos/SAAVY/magpie/hooks","issue_events_url":"https://api.github.com/repos/SAAVY/magpie/issues/events{/number}","events_url":"https://api.github.com/repos/SAAVY/magpie/events","assignees_url":"https://api.github.com/repos/SAAVY/magpie/assignees{/user}","branches_url":"https://api.github.com/repos/SAAVY/magpie/branches{/branch}","tags_url":"https://api.github.com/repos/SAAVY/magpie/tags","blobs_url":"https://api.github.com/repos/SAAVY/magpie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SAAVY/magpie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SAAVY/magpie/git/refs{/sha}","trees_url":"https://api.github.com/repos/SAAVY/magpie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SAAVY/magpie/statuses/{sha}","languages_url":"https://api.github.com/repos/SAAVY/magpie/languages","stargazers_url":"https://api.github.com/repos/SAAVY/magpie/stargazers","contributors_url":"https://api.github.com/repos/SAAVY/magpie/contributors","subscribers_url":"https://api.github.com/repos/SAAVY/magpie/subscribers","subscription_url":"https://api.github.com/repos/SAAVY/magpie/subscription","commits_url":"https://api.github.com/repos/SAAVY/magpie/commits{/sha}","git_commits_url":"https://api.github.com/repos/SAAVY/magpie/git/commits{/sha}","comments_url":"https://api.github.com/repos/SAAVY/magpie/comments{/number}","issue_comment_url":"https://api.github.com/repos/SAAVY/magpie/issues/comments{/number}","contents_url":"https://api.github.com/repos/SAAVY/magpie/contents/{+path}","compare_url":"https://api.github.com/repos/SAAVY/magpie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SAAVY/magpie/merges","archive_url":"https://api.github.com/repos/SAAVY/magpie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SAAVY/magpie/downloads","issues_url":"https://api.github.com/repos/SAAVY/magpie/issues{/number}","pulls_url":"https://api.github.com/repos/SAAVY/magpie/pulls{/number}","milestones_url":"https://api.github.com/repos/SAAVY/magpie/milestones{/number}","notifications_url":"https://api.github.com/repos/SAAVY/magpie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SAAVY/magpie/labels{/name}","releases_url":"https://api.github.com/repos/SAAVY/magpie/releases{/id}","created_at":"2015-05-20T16:15:51Z","updated_at":"2015-07-16T00:18:40Z","pushed_at":"2015-07-22T14:28:23Z","git_url":"git://github.com/SAAVY/magpie.git","ssh_url":"git@github.com:SAAVY/magpie.git","clone_url":"https://github.com/SAAVY/magpie.git","svn_url":"https://github.com/SAAVY/magpie","homepage":"http://projectmagpie.github.io","size":965,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":28,"forks":0,"open_issues":28,"watchers":2,"default_branch":"master"}},"base":{"label":"SAAVY:master","ref":"master","sha":"3ccc195faf0ec7991c9c0b420ff437564bf61684","user":{"login":"SAAVY","id":12940854,"avatar_url":"https://avatars.githubusercontent.com/u/12940854?v=3","gravatar_id":"","url":"https://api.github.com/users/SAAVY","html_url":"https://github.com/SAAVY","followers_url":"https://api.github.com/users/SAAVY/followers","following_url":"https://api.github.com/users/SAAVY/following{/other_user}","gists_url":"https://api.github.com/users/SAAVY/gists{/gist_id}","starred_url":"https://api.github.com/users/SAAVY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SAAVY/subscriptions","organizations_url":"https://api.github.com/users/SAAVY/orgs","repos_url":"https://api.github.com/users/SAAVY/repos","events_url":"https://api.github.com/users/SAAVY/events{/privacy}","received_events_url":"https://api.github.com/users/SAAVY/received_events","type":"Organization","site_admin":false},"repo":{"id":35959425,"name":"magpie","full_name":"SAAVY/magpie","owner":{"login":"SAAVY","id":12940854,"avatar_url":"https://avatars.githubusercontent.com/u/12940854?v=3","gravatar_id":"","url":"https://api.github.com/users/SAAVY","html_url":"https://github.com/SAAVY","followers_url":"https://api.github.com/users/SAAVY/followers","following_url":"https://api.github.com/users/SAAVY/following{/other_user}","gists_url":"https://api.github.com/users/SAAVY/gists{/gist_id}","starred_url":"https://api.github.com/users/SAAVY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SAAVY/subscriptions","organizations_url":"https://api.github.com/users/SAAVY/orgs","repos_url":"https://api.github.com/users/SAAVY/repos","events_url":"https://api.github.com/users/SAAVY/events{/privacy}","received_events_url":"https://api.github.com/users/SAAVY/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SAAVY/magpie","description":"","fork":false,"url":"https://api.github.com/repos/SAAVY/magpie","forks_url":"https://api.github.com/repos/SAAVY/magpie/forks","keys_url":"https://api.github.com/repos/SAAVY/magpie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SAAVY/magpie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SAAVY/magpie/teams","hooks_url":"https://api.github.com/repos/SAAVY/magpie/hooks","issue_events_url":"https://api.github.com/repos/SAAVY/magpie/issues/events{/number}","events_url":"https://api.github.com/repos/SAAVY/magpie/events","assignees_url":"https://api.github.com/repos/SAAVY/magpie/assignees{/user}","branches_url":"https://api.github.com/repos/SAAVY/magpie/branches{/branch}","tags_url":"https://api.github.com/repos/SAAVY/magpie/tags","blobs_url":"https://api.github.com/repos/SAAVY/magpie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SAAVY/magpie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SAAVY/magpie/git/refs{/sha}","trees_url":"https://api.github.com/repos/SAAVY/magpie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SAAVY/magpie/statuses/{sha}","languages_url":"https://api.github.com/repos/SAAVY/magpie/languages","stargazers_url":"https://api.github.com/repos/SAAVY/magpie/stargazers","contributors_url":"https://api.github.com/repos/SAAVY/magpie/contributors","subscribers_url":"https://api.github.com/repos/SAAVY/magpie/subscribers","subscription_url":"https://api.github.com/repos/SAAVY/magpie/subscription","commits_url":"https://api.github.com/repos/SAAVY/magpie/commits{/sha}","git_commits_url":"https://api.github.com/repos/SAAVY/magpie/git/commits{/sha}","comments_url":"https://api.github.com/repos/SAAVY/magpie/comments{/number}","issue_comment_url":"https://api.github.com/repos/SAAVY/magpie/issues/comments{/number}","contents_url":"https://api.github.com/repos/SAAVY/magpie/contents/{+path}","compare_url":"https://api.github.com/repos/SAAVY/magpie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SAAVY/magpie/merges","archive_url":"https://api.github.com/repos/SAAVY/magpie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SAAVY/magpie/downloads","issues_url":"https://api.github.com/repos/SAAVY/magpie/issues{/number}","pulls_url":"https://api.github.com/repos/SAAVY/magpie/pulls{/number}","milestones_url":"https://api.github.com/repos/SAAVY/magpie/milestones{/number}","notifications_url":"https://api.github.com/repos/SAAVY/magpie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SAAVY/magpie/labels{/name}","releases_url":"https://api.github.com/repos/SAAVY/magpie/releases{/id}","created_at":"2015-05-20T16:15:51Z","updated_at":"2015-07-16T00:18:40Z","pushed_at":"2015-07-22T14:28:23Z","git_url":"git://github.com/SAAVY/magpie.git","ssh_url":"git@github.com:SAAVY/magpie.git","clone_url":"https://github.com/SAAVY/magpie.git","svn_url":"https://github.com/SAAVY/magpie","homepage":"http://projectmagpie.github.io","size":965,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":28,"forks":0,"open_issues":28,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SAAVY/magpie/pulls/72"},"html":{"href":"https://github.com/SAAVY/magpie/pull/72"},"issue":{"href":"https://api.github.com/repos/SAAVY/magpie/issues/72"},"comments":{"href":"https://api.github.com/repos/SAAVY/magpie/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/SAAVY/magpie/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/SAAVY/magpie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SAAVY/magpie/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/SAAVY/magpie/statuses/b4c57eb1c53a5a9b3d925f3b11c7c32a60162a16"}}}}