{"action":"created","comment":{"url":"https://api.github.com/repos/snarfed/bridgy/pulls/comments/55955164","id":55955164,"diff_hunk":"@@ -117,10 +117,10 @@ def resolve(urls):\n     # the best chance of finding a match. Some silos allow several\n     # different permalink formats to point to the same place (e.g.,\n     # facebook user id instead of user name)\n-    syndication_url = source.canonicalize_syndication_url(\n-      util.follow_redirects(syndication_url).url)\n-    originals.update(_posse_post_discovery(\n-      source, activity, syndication_url, fetch_hfeed))\n+    syndication_url = source.canonicalize_url(syndication_url)\n+    if syndication_url:\n+      originals.update(_posse_post_discovery(\n+        source, activity, syndication_url, fetch_hfeed))","path":"original_post_discovery.py","position":11,"original_position":11,"commit_id":"be33876ef2fdad844e72b8481427f23ea19f5bf8","original_commit_id":"be33876ef2fdad844e72b8481427f23ea19f5bf8","user":{"login":"kylewm","id":950127,"avatar_url":"https://avatars.githubusercontent.com/u/950127?v=3","gravatar_id":"","url":"https://api.github.com/users/kylewm","html_url":"https://github.com/kylewm","followers_url":"https://api.github.com/users/kylewm/followers","following_url":"https://api.github.com/users/kylewm/following{/other_user}","gists_url":"https://api.github.com/users/kylewm/gists{/gist_id}","starred_url":"https://api.github.com/users/kylewm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylewm/subscriptions","organizations_url":"https://api.github.com/users/kylewm/orgs","repos_url":"https://api.github.com/users/kylewm/repos","events_url":"https://api.github.com/users/kylewm/events{/privacy}","received_events_url":"https://api.github.com/users/kylewm/received_events","type":"User","site_admin":false},"body":"oh interesting, so I was imagining it'd still follow redirects if the URL is unrecognized. This is more like: don't follow redirects (unless a service's implementation chooses to), we can always construct a canonical url out of the given url.\r\n\r\nI'm fine with that change, just want to make sure we're on the same page.","created_at":"2016-03-14T04:29:21Z","updated_at":"2016-03-14T04:29:21Z","html_url":"https://github.com/snarfed/bridgy/pull/634#discussion_r55955164","pull_request_url":"https://api.github.com/repos/snarfed/bridgy/pulls/634","_links":{"self":{"href":"https://api.github.com/repos/snarfed/bridgy/pulls/comments/55955164"},"html":{"href":"https://github.com/snarfed/bridgy/pull/634#discussion_r55955164"},"pull_request":{"href":"https://api.github.com/repos/snarfed/bridgy/pulls/634"}}},"pull_request":{"url":"https://api.github.com/repos/snarfed/bridgy/pulls/634","id":62698976,"html_url":"https://github.com/snarfed/bridgy/pull/634","diff_url":"https://github.com/snarfed/bridgy/pull/634.diff","patch_url":"https://github.com/snarfed/bridgy/pull/634.patch","issue_url":"https://api.github.com/repos/snarfed/bridgy/issues/634","number":634,"state":"open","locked":false,"title":"rewrite canonicalize_syndication_url so it skips HEADing known silo URL formats","user":{"login":"snarfed","id":778068,"avatar_url":"https://avatars.githubusercontent.com/u/778068?v=3","gravatar_id":"","url":"https://api.github.com/users/snarfed","html_url":"https://github.com/snarfed","followers_url":"https://api.github.com/users/snarfed/followers","following_url":"https://api.github.com/users/snarfed/following{/other_user}","gists_url":"https://api.github.com/users/snarfed/gists{/gist_id}","starred_url":"https://api.github.com/users/snarfed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snarfed/subscriptions","organizations_url":"https://api.github.com/users/snarfed/orgs","repos_url":"https://api.github.com/users/snarfed/repos","events_url":"https://api.github.com/users/snarfed/events{/privacy}","received_events_url":"https://api.github.com/users/snarfed/received_events","type":"User","site_admin":false},"body":"for #624, #628\n\n@kylewm just fyi. no need to fully review this unless you're bored! (it's not\nexactly clean commit by commit anyway; the full PR diff is probably simpler.)\n\ni'm not entirely confident in it, but i'll probably try it out in prod for a bit\ntomorrow and see what breaks. :P","created_at":"2016-03-14T04:20:06Z","updated_at":"2016-03-14T04:29:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd5b12fb927187eafe893ec57caa9b3ea7726c87","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/snarfed/bridgy/pulls/634/commits","review_comments_url":"https://api.github.com/repos/snarfed/bridgy/pulls/634/comments","review_comment_url":"https://api.github.com/repos/snarfed/bridgy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/snarfed/bridgy/issues/634/comments","statuses_url":"https://api.github.com/repos/snarfed/bridgy/statuses/be33876ef2fdad844e72b8481427f23ea19f5bf8","head":{"label":"snarfed:canonicalize_url","ref":"canonicalize_url","sha":"be33876ef2fdad844e72b8481427f23ea19f5bf8","user":{"login":"snarfed","id":778068,"avatar_url":"https://avatars.githubusercontent.com/u/778068?v=3","gravatar_id":"","url":"https://api.github.com/users/snarfed","html_url":"https://github.com/snarfed","followers_url":"https://api.github.com/users/snarfed/followers","following_url":"https://api.github.com/users/snarfed/following{/other_user}","gists_url":"https://api.github.com/users/snarfed/gists{/gist_id}","starred_url":"https://api.github.com/users/snarfed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snarfed/subscriptions","organizations_url":"https://api.github.com/users/snarfed/orgs","repos_url":"https://api.github.com/users/snarfed/repos","events_url":"https://api.github.com/users/snarfed/events{/privacy}","received_events_url":"https://api.github.com/users/snarfed/received_events","type":"User","site_admin":false},"repo":{"id":2968000,"name":"bridgy","full_name":"snarfed/bridgy","owner":{"login":"snarfed","id":778068,"avatar_url":"https://avatars.githubusercontent.com/u/778068?v=3","gravatar_id":"","url":"https://api.github.com/users/snarfed","html_url":"https://github.com/snarfed","followers_url":"https://api.github.com/users/snarfed/followers","following_url":"https://api.github.com/users/snarfed/following{/other_user}","gists_url":"https://api.github.com/users/snarfed/gists{/gist_id}","starred_url":"https://api.github.com/users/snarfed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snarfed/subscriptions","organizations_url":"https://api.github.com/users/snarfed/orgs","repos_url":"https://api.github.com/users/snarfed/repos","events_url":"https://api.github.com/users/snarfed/events{/privacy}","received_events_url":"https://api.github.com/users/snarfed/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/snarfed/bridgy","description":"Bridgy pulls comments and likes from social networks back to your web site. You can also use it to publish your posts to those networks.","fork":false,"url":"https://api.github.com/repos/snarfed/bridgy","forks_url":"https://api.github.com/repos/snarfed/bridgy/forks","keys_url":"https://api.github.com/repos/snarfed/bridgy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snarfed/bridgy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snarfed/bridgy/teams","hooks_url":"https://api.github.com/repos/snarfed/bridgy/hooks","issue_events_url":"https://api.github.com/repos/snarfed/bridgy/issues/events{/number}","events_url":"https://api.github.com/repos/snarfed/bridgy/events","assignees_url":"https://api.github.com/repos/snarfed/bridgy/assignees{/user}","branches_url":"https://api.github.com/repos/snarfed/bridgy/branches{/branch}","tags_url":"https://api.github.com/repos/snarfed/bridgy/tags","blobs_url":"https://api.github.com/repos/snarfed/bridgy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snarfed/bridgy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snarfed/bridgy/git/refs{/sha}","trees_url":"https://api.github.com/repos/snarfed/bridgy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snarfed/bridgy/statuses/{sha}","languages_url":"https://api.github.com/repos/snarfed/bridgy/languages","stargazers_url":"https://api.github.com/repos/snarfed/bridgy/stargazers","contributors_url":"https://api.github.com/repos/snarfed/bridgy/contributors","subscribers_url":"https://api.github.com/repos/snarfed/bridgy/subscribers","subscription_url":"https://api.github.com/repos/snarfed/bridgy/subscription","commits_url":"https://api.github.com/repos/snarfed/bridgy/commits{/sha}","git_commits_url":"https://api.github.com/repos/snarfed/bridgy/git/commits{/sha}","comments_url":"https://api.github.com/repos/snarfed/bridgy/comments{/number}","issue_comment_url":"https://api.github.com/repos/snarfed/bridgy/issues/comments{/number}","contents_url":"https://api.github.com/repos/snarfed/bridgy/contents/{+path}","compare_url":"https://api.github.com/repos/snarfed/bridgy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snarfed/bridgy/merges","archive_url":"https://api.github.com/repos/snarfed/bridgy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snarfed/bridgy/downloads","issues_url":"https://api.github.com/repos/snarfed/bridgy/issues{/number}","pulls_url":"https://api.github.com/repos/snarfed/bridgy/pulls{/number}","milestones_url":"https://api.github.com/repos/snarfed/bridgy/milestones{/number}","notifications_url":"https://api.github.com/repos/snarfed/bridgy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snarfed/bridgy/labels{/name}","releases_url":"https://api.github.com/repos/snarfed/bridgy/releases{/id}","deployments_url":"https://api.github.com/repos/snarfed/bridgy/deployments","created_at":"2011-12-12T22:33:45Z","updated_at":"2016-03-09T02:04:58Z","pushed_at":"2016-03-14T04:20:06Z","git_url":"git://github.com/snarfed/bridgy.git","ssh_url":"git@github.com:snarfed/bridgy.git","clone_url":"https://github.com/snarfed/bridgy.git","svn_url":"https://github.com/snarfed/bridgy","homepage":"https://brid.gy/","size":4676,"stargazers_count":167,"watchers_count":167,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":101,"forks":14,"open_issues":101,"watchers":167,"default_branch":"master"}},"base":{"label":"snarfed:master","ref":"master","sha":"2e3512eb438365364a42ab8606122353f838fbf1","user":{"login":"snarfed","id":778068,"avatar_url":"https://avatars.githubusercontent.com/u/778068?v=3","gravatar_id":"","url":"https://api.github.com/users/snarfed","html_url":"https://github.com/snarfed","followers_url":"https://api.github.com/users/snarfed/followers","following_url":"https://api.github.com/users/snarfed/following{/other_user}","gists_url":"https://api.github.com/users/snarfed/gists{/gist_id}","starred_url":"https://api.github.com/users/snarfed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snarfed/subscriptions","organizations_url":"https://api.github.com/users/snarfed/orgs","repos_url":"https://api.github.com/users/snarfed/repos","events_url":"https://api.github.com/users/snarfed/events{/privacy}","received_events_url":"https://api.github.com/users/snarfed/received_events","type":"User","site_admin":false},"repo":{"id":2968000,"name":"bridgy","full_name":"snarfed/bridgy","owner":{"login":"snarfed","id":778068,"avatar_url":"https://avatars.githubusercontent.com/u/778068?v=3","gravatar_id":"","url":"https://api.github.com/users/snarfed","html_url":"https://github.com/snarfed","followers_url":"https://api.github.com/users/snarfed/followers","following_url":"https://api.github.com/users/snarfed/following{/other_user}","gists_url":"https://api.github.com/users/snarfed/gists{/gist_id}","starred_url":"https://api.github.com/users/snarfed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snarfed/subscriptions","organizations_url":"https://api.github.com/users/snarfed/orgs","repos_url":"https://api.github.com/users/snarfed/repos","events_url":"https://api.github.com/users/snarfed/events{/privacy}","received_events_url":"https://api.github.com/users/snarfed/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/snarfed/bridgy","description":"Bridgy pulls comments and likes from social networks back to your web site. You can also use it to publish your posts to those networks.","fork":false,"url":"https://api.github.com/repos/snarfed/bridgy","forks_url":"https://api.github.com/repos/snarfed/bridgy/forks","keys_url":"https://api.github.com/repos/snarfed/bridgy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snarfed/bridgy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snarfed/bridgy/teams","hooks_url":"https://api.github.com/repos/snarfed/bridgy/hooks","issue_events_url":"https://api.github.com/repos/snarfed/bridgy/issues/events{/number}","events_url":"https://api.github.com/repos/snarfed/bridgy/events","assignees_url":"https://api.github.com/repos/snarfed/bridgy/assignees{/user}","branches_url":"https://api.github.com/repos/snarfed/bridgy/branches{/branch}","tags_url":"https://api.github.com/repos/snarfed/bridgy/tags","blobs_url":"https://api.github.com/repos/snarfed/bridgy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snarfed/bridgy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snarfed/bridgy/git/refs{/sha}","trees_url":"https://api.github.com/repos/snarfed/bridgy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snarfed/bridgy/statuses/{sha}","languages_url":"https://api.github.com/repos/snarfed/bridgy/languages","stargazers_url":"https://api.github.com/repos/snarfed/bridgy/stargazers","contributors_url":"https://api.github.com/repos/snarfed/bridgy/contributors","subscribers_url":"https://api.github.com/repos/snarfed/bridgy/subscribers","subscription_url":"https://api.github.com/repos/snarfed/bridgy/subscription","commits_url":"https://api.github.com/repos/snarfed/bridgy/commits{/sha}","git_commits_url":"https://api.github.com/repos/snarfed/bridgy/git/commits{/sha}","comments_url":"https://api.github.com/repos/snarfed/bridgy/comments{/number}","issue_comment_url":"https://api.github.com/repos/snarfed/bridgy/issues/comments{/number}","contents_url":"https://api.github.com/repos/snarfed/bridgy/contents/{+path}","compare_url":"https://api.github.com/repos/snarfed/bridgy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snarfed/bridgy/merges","archive_url":"https://api.github.com/repos/snarfed/bridgy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snarfed/bridgy/downloads","issues_url":"https://api.github.com/repos/snarfed/bridgy/issues{/number}","pulls_url":"https://api.github.com/repos/snarfed/bridgy/pulls{/number}","milestones_url":"https://api.github.com/repos/snarfed/bridgy/milestones{/number}","notifications_url":"https://api.github.com/repos/snarfed/bridgy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snarfed/bridgy/labels{/name}","releases_url":"https://api.github.com/repos/snarfed/bridgy/releases{/id}","deployments_url":"https://api.github.com/repos/snarfed/bridgy/deployments","created_at":"2011-12-12T22:33:45Z","updated_at":"2016-03-09T02:04:58Z","pushed_at":"2016-03-14T04:20:06Z","git_url":"git://github.com/snarfed/bridgy.git","ssh_url":"git@github.com:snarfed/bridgy.git","clone_url":"https://github.com/snarfed/bridgy.git","svn_url":"https://github.com/snarfed/bridgy","homepage":"https://brid.gy/","size":4676,"stargazers_count":167,"watchers_count":167,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":101,"forks":14,"open_issues":101,"watchers":167,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/snarfed/bridgy/pulls/634"},"html":{"href":"https://github.com/snarfed/bridgy/pull/634"},"issue":{"href":"https://api.github.com/repos/snarfed/bridgy/issues/634"},"comments":{"href":"https://api.github.com/repos/snarfed/bridgy/issues/634/comments"},"review_comments":{"href":"https://api.github.com/repos/snarfed/bridgy/pulls/634/comments"},"review_comment":{"href":"https://api.github.com/repos/snarfed/bridgy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/snarfed/bridgy/pulls/634/commits"},"statuses":{"href":"https://api.github.com/repos/snarfed/bridgy/statuses/be33876ef2fdad844e72b8481427f23ea19f5bf8"}}}}