{"action":"created","comment":{"url":"https://api.github.com/repos/joeyespo/grip/pulls/comments/23906165","id":23906165,"diff_hunk":"@@ -384,9 +392,8 @@ def _cache_contents(style_urls, asset_pattern, asset_pattern_sub, cache_path):\n \n     for asset_url in asset_urls:\n         filename = _cache_filename(asset_url, cache_path)\n-        contents = requests.get(asset_url, verify=False).text\n-        # Write file and show message\n-        _write_file(filename, contents)\n+        # Retrieve file and show message\n+        urlretrieve(asset_url, filename)","path":"grip/server.py","position":30,"original_position":30,"commit_id":"f2996b4f7895025f3c3f8cb79006eaead1070d36","original_commit_id":"f2996b4f7895025f3c3f8cb79006eaead1070d36","user":{"login":"joeyespo","id":634573,"avatar_url":"https://avatars.githubusercontent.com/u/634573?v=3","gravatar_id":"","url":"https://api.github.com/users/joeyespo","html_url":"https://github.com/joeyespo","followers_url":"https://api.github.com/users/joeyespo/followers","following_url":"https://api.github.com/users/joeyespo/following{/other_user}","gists_url":"https://api.github.com/users/joeyespo/gists{/gist_id}","starred_url":"https://api.github.com/users/joeyespo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeyespo/subscriptions","organizations_url":"https://api.github.com/users/joeyespo/orgs","repos_url":"https://api.github.com/users/joeyespo/repos","events_url":"https://api.github.com/users/joeyespo/events{/privacy}","received_events_url":"https://api.github.com/users/joeyespo/received_events","type":"User","site_admin":false},"body":"Is this more robust than using requests and writing to a file?\r\n\r\nRequests handles things like following redirects for you.\r\n","created_at":"2015-02-02T04:04:28Z","updated_at":"2015-02-02T04:04:28Z","html_url":"https://github.com/joeyespo/grip/pull/95#discussion_r23906165","pull_request_url":"https://api.github.com/repos/joeyespo/grip/pulls/95","_links":{"self":{"href":"https://api.github.com/repos/joeyespo/grip/pulls/comments/23906165"},"html":{"href":"https://github.com/joeyespo/grip/pull/95#discussion_r23906165"},"pull_request":{"href":"https://api.github.com/repos/joeyespo/grip/pulls/95"}}},"pull_request":{"url":"https://api.github.com/repos/joeyespo/grip/pulls/95","id":27529977,"html_url":"https://github.com/joeyespo/grip/pull/95","diff_url":"https://github.com/joeyespo/grip/pull/95.diff","patch_url":"https://github.com/joeyespo/grip/pull/95.patch","issue_url":"https://api.github.com/repos/joeyespo/grip/issues/95","number":95,"state":"open","locked":false,"title":"Missing icons","user":{"login":"madflow","id":183248,"avatar_url":"https://avatars.githubusercontent.com/u/183248?v=3","gravatar_id":"","url":"https://api.github.com/users/madflow","html_url":"https://github.com/madflow","followers_url":"https://api.github.com/users/madflow/followers","following_url":"https://api.github.com/users/madflow/following{/other_user}","gists_url":"https://api.github.com/users/madflow/gists{/gist_id}","starred_url":"https://api.github.com/users/madflow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madflow/subscriptions","organizations_url":"https://api.github.com/users/madflow/orgs","repos_url":"https://api.github.com/users/madflow/repos","events_url":"https://api.github.com/users/madflow/events{/privacy}","received_events_url":"https://api.github.com/users/madflow/received_events","type":"User","site_admin":false},"body":"This is a possible fix for #85. The problem seems to be twofold: \r\n\r\n1. Downloading the assets from the server with ```requests.get(asset_url, verify=False).text``` seemed to bail on .woff etc files (wrong file size)\r\n2. The generic ```<path:filename>``` route did not match the icons url.\r\n\r\nThis is a typical \"works for me\" hack - maybe it does some good ;)","created_at":"2015-01-16T19:29:43Z","updated_at":"2015-02-02T04:04:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ede5d7ab1e6be963c3c50d19338fae247aee3a4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/joeyespo/grip/pulls/95/commits","review_comments_url":"https://api.github.com/repos/joeyespo/grip/pulls/95/comments","review_comment_url":"https://api.github.com/repos/joeyespo/grip/pulls/comments/{number}","comments_url":"https://api.github.com/repos/joeyespo/grip/issues/95/comments","statuses_url":"https://api.github.com/repos/joeyespo/grip/statuses/f2996b4f7895025f3c3f8cb79006eaead1070d36","head":{"label":"madflow:missing-icons","ref":"missing-icons","sha":"f2996b4f7895025f3c3f8cb79006eaead1070d36","user":{"login":"madflow","id":183248,"avatar_url":"https://avatars.githubusercontent.com/u/183248?v=3","gravatar_id":"","url":"https://api.github.com/users/madflow","html_url":"https://github.com/madflow","followers_url":"https://api.github.com/users/madflow/followers","following_url":"https://api.github.com/users/madflow/following{/other_user}","gists_url":"https://api.github.com/users/madflow/gists{/gist_id}","starred_url":"https://api.github.com/users/madflow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madflow/subscriptions","organizations_url":"https://api.github.com/users/madflow/orgs","repos_url":"https://api.github.com/users/madflow/repos","events_url":"https://api.github.com/users/madflow/events{/privacy}","received_events_url":"https://api.github.com/users/madflow/received_events","type":"User","site_admin":false},"repo":{"id":29207592,"name":"grip","full_name":"madflow/grip","owner":{"login":"madflow","id":183248,"avatar_url":"https://avatars.githubusercontent.com/u/183248?v=3","gravatar_id":"","url":"https://api.github.com/users/madflow","html_url":"https://github.com/madflow","followers_url":"https://api.github.com/users/madflow/followers","following_url":"https://api.github.com/users/madflow/following{/other_user}","gists_url":"https://api.github.com/users/madflow/gists{/gist_id}","starred_url":"https://api.github.com/users/madflow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madflow/subscriptions","organizations_url":"https://api.github.com/users/madflow/orgs","repos_url":"https://api.github.com/users/madflow/repos","events_url":"https://api.github.com/users/madflow/events{/privacy}","received_events_url":"https://api.github.com/users/madflow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/madflow/grip","description":"Preview GitHub Markdown files like Readme locally before committing them.","fork":true,"url":"https://api.github.com/repos/madflow/grip","forks_url":"https://api.github.com/repos/madflow/grip/forks","keys_url":"https://api.github.com/repos/madflow/grip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/madflow/grip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/madflow/grip/teams","hooks_url":"https://api.github.com/repos/madflow/grip/hooks","issue_events_url":"https://api.github.com/repos/madflow/grip/issues/events{/number}","events_url":"https://api.github.com/repos/madflow/grip/events","assignees_url":"https://api.github.com/repos/madflow/grip/assignees{/user}","branches_url":"https://api.github.com/repos/madflow/grip/branches{/branch}","tags_url":"https://api.github.com/repos/madflow/grip/tags","blobs_url":"https://api.github.com/repos/madflow/grip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/madflow/grip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/madflow/grip/git/refs{/sha}","trees_url":"https://api.github.com/repos/madflow/grip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/madflow/grip/statuses/{sha}","languages_url":"https://api.github.com/repos/madflow/grip/languages","stargazers_url":"https://api.github.com/repos/madflow/grip/stargazers","contributors_url":"https://api.github.com/repos/madflow/grip/contributors","subscribers_url":"https://api.github.com/repos/madflow/grip/subscribers","subscription_url":"https://api.github.com/repos/madflow/grip/subscription","commits_url":"https://api.github.com/repos/madflow/grip/commits{/sha}","git_commits_url":"https://api.github.com/repos/madflow/grip/git/commits{/sha}","comments_url":"https://api.github.com/repos/madflow/grip/comments{/number}","issue_comment_url":"https://api.github.com/repos/madflow/grip/issues/comments/{number}","contents_url":"https://api.github.com/repos/madflow/grip/contents/{+path}","compare_url":"https://api.github.com/repos/madflow/grip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/madflow/grip/merges","archive_url":"https://api.github.com/repos/madflow/grip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/madflow/grip/downloads","issues_url":"https://api.github.com/repos/madflow/grip/issues{/number}","pulls_url":"https://api.github.com/repos/madflow/grip/pulls{/number}","milestones_url":"https://api.github.com/repos/madflow/grip/milestones{/number}","notifications_url":"https://api.github.com/repos/madflow/grip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/madflow/grip/labels{/name}","releases_url":"https://api.github.com/repos/madflow/grip/releases{/id}","created_at":"2015-01-13T19:44:23Z","updated_at":"2015-01-13T19:44:23Z","pushed_at":"2015-01-17T10:55:41Z","git_url":"git://github.com/madflow/grip.git","ssh_url":"git@github.com:madflow/grip.git","clone_url":"https://github.com/madflow/grip.git","svn_url":"https://github.com/madflow/grip","homepage":"","size":292,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"joeyespo:master","ref":"master","sha":"351e32501d0a84c4841ef7b0eaf50e799f161bfe","user":{"login":"joeyespo","id":634573,"avatar_url":"https://avatars.githubusercontent.com/u/634573?v=3","gravatar_id":"","url":"https://api.github.com/users/joeyespo","html_url":"https://github.com/joeyespo","followers_url":"https://api.github.com/users/joeyespo/followers","following_url":"https://api.github.com/users/joeyespo/following{/other_user}","gists_url":"https://api.github.com/users/joeyespo/gists{/gist_id}","starred_url":"https://api.github.com/users/joeyespo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeyespo/subscriptions","organizations_url":"https://api.github.com/users/joeyespo/orgs","repos_url":"https://api.github.com/users/joeyespo/repos","events_url":"https://api.github.com/users/joeyespo/events{/privacy}","received_events_url":"https://api.github.com/users/joeyespo/received_events","type":"User","site_admin":false},"repo":{"id":6732980,"name":"grip","full_name":"joeyespo/grip","owner":{"login":"joeyespo","id":634573,"avatar_url":"https://avatars.githubusercontent.com/u/634573?v=3","gravatar_id":"","url":"https://api.github.com/users/joeyespo","html_url":"https://github.com/joeyespo","followers_url":"https://api.github.com/users/joeyespo/followers","following_url":"https://api.github.com/users/joeyespo/following{/other_user}","gists_url":"https://api.github.com/users/joeyespo/gists{/gist_id}","starred_url":"https://api.github.com/users/joeyespo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeyespo/subscriptions","organizations_url":"https://api.github.com/users/joeyespo/orgs","repos_url":"https://api.github.com/users/joeyespo/repos","events_url":"https://api.github.com/users/joeyespo/events{/privacy}","received_events_url":"https://api.github.com/users/joeyespo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joeyespo/grip","description":"Preview GitHub Markdown files like Readme locally before committing them.","fork":false,"url":"https://api.github.com/repos/joeyespo/grip","forks_url":"https://api.github.com/repos/joeyespo/grip/forks","keys_url":"https://api.github.com/repos/joeyespo/grip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joeyespo/grip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joeyespo/grip/teams","hooks_url":"https://api.github.com/repos/joeyespo/grip/hooks","issue_events_url":"https://api.github.com/repos/joeyespo/grip/issues/events{/number}","events_url":"https://api.github.com/repos/joeyespo/grip/events","assignees_url":"https://api.github.com/repos/joeyespo/grip/assignees{/user}","branches_url":"https://api.github.com/repos/joeyespo/grip/branches{/branch}","tags_url":"https://api.github.com/repos/joeyespo/grip/tags","blobs_url":"https://api.github.com/repos/joeyespo/grip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joeyespo/grip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joeyespo/grip/git/refs{/sha}","trees_url":"https://api.github.com/repos/joeyespo/grip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joeyespo/grip/statuses/{sha}","languages_url":"https://api.github.com/repos/joeyespo/grip/languages","stargazers_url":"https://api.github.com/repos/joeyespo/grip/stargazers","contributors_url":"https://api.github.com/repos/joeyespo/grip/contributors","subscribers_url":"https://api.github.com/repos/joeyespo/grip/subscribers","subscription_url":"https://api.github.com/repos/joeyespo/grip/subscription","commits_url":"https://api.github.com/repos/joeyespo/grip/commits{/sha}","git_commits_url":"https://api.github.com/repos/joeyespo/grip/git/commits{/sha}","comments_url":"https://api.github.com/repos/joeyespo/grip/comments{/number}","issue_comment_url":"https://api.github.com/repos/joeyespo/grip/issues/comments/{number}","contents_url":"https://api.github.com/repos/joeyespo/grip/contents/{+path}","compare_url":"https://api.github.com/repos/joeyespo/grip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joeyespo/grip/merges","archive_url":"https://api.github.com/repos/joeyespo/grip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joeyespo/grip/downloads","issues_url":"https://api.github.com/repos/joeyespo/grip/issues{/number}","pulls_url":"https://api.github.com/repos/joeyespo/grip/pulls{/number}","milestones_url":"https://api.github.com/repos/joeyespo/grip/milestones{/number}","notifications_url":"https://api.github.com/repos/joeyespo/grip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joeyespo/grip/labels{/name}","releases_url":"https://api.github.com/repos/joeyespo/grip/releases{/id}","created_at":"2012-11-17T07:27:16Z","updated_at":"2015-02-01T23:33:23Z","pushed_at":"2014-12-10T03:08:52Z","git_url":"git://github.com/joeyespo/grip.git","ssh_url":"git@github.com:joeyespo/grip.git","clone_url":"https://github.com/joeyespo/grip.git","svn_url":"https://github.com/joeyespo/grip","homepage":"","size":706,"stargazers_count":534,"watchers_count":534,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":14,"forks":62,"open_issues":14,"watchers":534,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/joeyespo/grip/pulls/95"},"html":{"href":"https://github.com/joeyespo/grip/pull/95"},"issue":{"href":"https://api.github.com/repos/joeyespo/grip/issues/95"},"comments":{"href":"https://api.github.com/repos/joeyespo/grip/issues/95/comments"},"review_comments":{"href":"https://api.github.com/repos/joeyespo/grip/pulls/95/comments"},"review_comment":{"href":"https://api.github.com/repos/joeyespo/grip/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/joeyespo/grip/pulls/95/commits"},"statuses":{"href":"https://api.github.com/repos/joeyespo/grip/statuses/f2996b4f7895025f3c3f8cb79006eaead1070d36"}}}}