{"action":"created","comment":{"url":"https://api.github.com/repos/scrapy/scrapy/pulls/comments/50424489","id":50424489,"diff_hunk":"@@ -21,12 +23,19 @@ def __init__(self):\n         if not self.proxies:\n             raise NotConfigured\n \n+    @classmethod\n+    def from_crawler(cls, crawler):\n+        auth_encoding = crawler.settings.get('HTTPPROXY_AUTH_ENCODING')\n+        return cls(auth_encoding)\n+\n     def _get_proxy(self, url, orig_type):\n         proxy_type, user, password, hostport = _parse_proxy(url)\n         proxy_url = urlunparse((proxy_type or orig_type, hostport, '', '', '', ''))\n \n         if user:\n-            user_pass = '%s:%s' % (unquote(user), unquote(password))\n+            user_pass = to_bytes(\n+                '%s:%s' % (unquote(user), unquote(password)),","path":"scrapy/downloadermiddlewares/httpproxy.py","position":31,"original_position":31,"commit_id":"a06a5f00f4a62028416ada4919994efd7d439eb2","original_commit_id":"a06a5f00f4a62028416ada4919994efd7d439eb2","user":{"login":"nramirezuy","id":1042865,"avatar_url":"https://avatars.githubusercontent.com/u/1042865?v=3","gravatar_id":"","url":"https://api.github.com/users/nramirezuy","html_url":"https://github.com/nramirezuy","followers_url":"https://api.github.com/users/nramirezuy/followers","following_url":"https://api.github.com/users/nramirezuy/following{/other_user}","gists_url":"https://api.github.com/users/nramirezuy/gists{/gist_id}","starred_url":"https://api.github.com/users/nramirezuy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nramirezuy/subscriptions","organizations_url":"https://api.github.com/users/nramirezuy/orgs","repos_url":"https://api.github.com/users/nramirezuy/repos","events_url":"https://api.github.com/users/nramirezuy/events{/privacy}","received_events_url":"https://api.github.com/users/nramirezuy/received_events","type":"User","site_admin":false},"body":"Nothing, I was thinking it wrong.","created_at":"2016-01-21T16:31:01Z","updated_at":"2016-01-21T16:31:01Z","html_url":"https://github.com/scrapy/scrapy/pull/1637#discussion_r50424489","pull_request_url":"https://api.github.com/repos/scrapy/scrapy/pulls/1637","_links":{"self":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/comments/50424489"},"html":{"href":"https://github.com/scrapy/scrapy/pull/1637#discussion_r50424489"},"pull_request":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/1637"}}},"pull_request":{"url":"https://api.github.com/repos/scrapy/scrapy/pulls/1637","id":53351855,"html_url":"https://github.com/scrapy/scrapy/pull/1637","diff_url":"https://github.com/scrapy/scrapy/pull/1637.diff","patch_url":"https://github.com/scrapy/scrapy/pull/1637.patch","issue_url":"https://api.github.com/repos/scrapy/scrapy/issues/1637","number":1637,"state":"closed","locked":false,"title":"[MRG+1] py3 fix HttpProxy and Retry Middlewares","user":{"login":"eLRuLL","id":1459486,"avatar_url":"https://avatars.githubusercontent.com/u/1459486?v=3","gravatar_id":"","url":"https://api.github.com/users/eLRuLL","html_url":"https://github.com/eLRuLL","followers_url":"https://api.github.com/users/eLRuLL/followers","following_url":"https://api.github.com/users/eLRuLL/following{/other_user}","gists_url":"https://api.github.com/users/eLRuLL/gists{/gist_id}","starred_url":"https://api.github.com/users/eLRuLL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eLRuLL/subscriptions","organizations_url":"https://api.github.com/users/eLRuLL/orgs","repos_url":"https://api.github.com/users/eLRuLL/repos","events_url":"https://api.github.com/users/eLRuLL/events{/privacy}","received_events_url":"https://api.github.com/users/eLRuLL/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-11T04:08:13Z","updated_at":"2016-01-21T16:31:01Z","closed_at":"2016-01-21T14:49:42Z","merged_at":"2016-01-21T14:49:42Z","merge_commit_sha":"75e022e0344fc950086d3762a93849212613de8c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scrapy/scrapy/pulls/1637/commits","review_comments_url":"https://api.github.com/repos/scrapy/scrapy/pulls/1637/comments","review_comment_url":"https://api.github.com/repos/scrapy/scrapy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scrapy/scrapy/issues/1637/comments","statuses_url":"https://api.github.com/repos/scrapy/scrapy/statuses/a06a5f00f4a62028416ada4919994efd7d439eb2","head":{"label":"eLRuLL:py3-httpproxy-retry","ref":"py3-httpproxy-retry","sha":"a06a5f00f4a62028416ada4919994efd7d439eb2","user":{"login":"eLRuLL","id":1459486,"avatar_url":"https://avatars.githubusercontent.com/u/1459486?v=3","gravatar_id":"","url":"https://api.github.com/users/eLRuLL","html_url":"https://github.com/eLRuLL","followers_url":"https://api.github.com/users/eLRuLL/followers","following_url":"https://api.github.com/users/eLRuLL/following{/other_user}","gists_url":"https://api.github.com/users/eLRuLL/gists{/gist_id}","starred_url":"https://api.github.com/users/eLRuLL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eLRuLL/subscriptions","organizations_url":"https://api.github.com/users/eLRuLL/orgs","repos_url":"https://api.github.com/users/eLRuLL/repos","events_url":"https://api.github.com/users/eLRuLL/events{/privacy}","received_events_url":"https://api.github.com/users/eLRuLL/received_events","type":"User","site_admin":false},"repo":{"id":16935791,"name":"scrapy","full_name":"eLRuLL/scrapy","owner":{"login":"eLRuLL","id":1459486,"avatar_url":"https://avatars.githubusercontent.com/u/1459486?v=3","gravatar_id":"","url":"https://api.github.com/users/eLRuLL","html_url":"https://github.com/eLRuLL","followers_url":"https://api.github.com/users/eLRuLL/followers","following_url":"https://api.github.com/users/eLRuLL/following{/other_user}","gists_url":"https://api.github.com/users/eLRuLL/gists{/gist_id}","starred_url":"https://api.github.com/users/eLRuLL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eLRuLL/subscriptions","organizations_url":"https://api.github.com/users/eLRuLL/orgs","repos_url":"https://api.github.com/users/eLRuLL/repos","events_url":"https://api.github.com/users/eLRuLL/events{/privacy}","received_events_url":"https://api.github.com/users/eLRuLL/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eLRuLL/scrapy","description":"Scrapy, a fast high-level screen scraping and web crawling framework for Python.","fork":true,"url":"https://api.github.com/repos/eLRuLL/scrapy","forks_url":"https://api.github.com/repos/eLRuLL/scrapy/forks","keys_url":"https://api.github.com/repos/eLRuLL/scrapy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eLRuLL/scrapy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eLRuLL/scrapy/teams","hooks_url":"https://api.github.com/repos/eLRuLL/scrapy/hooks","issue_events_url":"https://api.github.com/repos/eLRuLL/scrapy/issues/events{/number}","events_url":"https://api.github.com/repos/eLRuLL/scrapy/events","assignees_url":"https://api.github.com/repos/eLRuLL/scrapy/assignees{/user}","branches_url":"https://api.github.com/repos/eLRuLL/scrapy/branches{/branch}","tags_url":"https://api.github.com/repos/eLRuLL/scrapy/tags","blobs_url":"https://api.github.com/repos/eLRuLL/scrapy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eLRuLL/scrapy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eLRuLL/scrapy/git/refs{/sha}","trees_url":"https://api.github.com/repos/eLRuLL/scrapy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eLRuLL/scrapy/statuses/{sha}","languages_url":"https://api.github.com/repos/eLRuLL/scrapy/languages","stargazers_url":"https://api.github.com/repos/eLRuLL/scrapy/stargazers","contributors_url":"https://api.github.com/repos/eLRuLL/scrapy/contributors","subscribers_url":"https://api.github.com/repos/eLRuLL/scrapy/subscribers","subscription_url":"https://api.github.com/repos/eLRuLL/scrapy/subscription","commits_url":"https://api.github.com/repos/eLRuLL/scrapy/commits{/sha}","git_commits_url":"https://api.github.com/repos/eLRuLL/scrapy/git/commits{/sha}","comments_url":"https://api.github.com/repos/eLRuLL/scrapy/comments{/number}","issue_comment_url":"https://api.github.com/repos/eLRuLL/scrapy/issues/comments{/number}","contents_url":"https://api.github.com/repos/eLRuLL/scrapy/contents/{+path}","compare_url":"https://api.github.com/repos/eLRuLL/scrapy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eLRuLL/scrapy/merges","archive_url":"https://api.github.com/repos/eLRuLL/scrapy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eLRuLL/scrapy/downloads","issues_url":"https://api.github.com/repos/eLRuLL/scrapy/issues{/number}","pulls_url":"https://api.github.com/repos/eLRuLL/scrapy/pulls{/number}","milestones_url":"https://api.github.com/repos/eLRuLL/scrapy/milestones{/number}","notifications_url":"https://api.github.com/repos/eLRuLL/scrapy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eLRuLL/scrapy/labels{/name}","releases_url":"https://api.github.com/repos/eLRuLL/scrapy/releases{/id}","created_at":"2014-02-18T03:31:33Z","updated_at":"2016-01-20T22:20:43Z","pushed_at":"2016-01-21T14:35:27Z","git_url":"git://github.com/eLRuLL/scrapy.git","ssh_url":"git@github.com:eLRuLL/scrapy.git","clone_url":"https://github.com/eLRuLL/scrapy.git","svn_url":"https://github.com/eLRuLL/scrapy","homepage":"http://scrapy.org","size":13761,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":true,"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":"scrapy:master","ref":"master","sha":"c9e046d11dc63fbdc40effce4e6d15bcecd44593","user":{"login":"scrapy","id":733635,"avatar_url":"https://avatars.githubusercontent.com/u/733635?v=3","gravatar_id":"","url":"https://api.github.com/users/scrapy","html_url":"https://github.com/scrapy","followers_url":"https://api.github.com/users/scrapy/followers","following_url":"https://api.github.com/users/scrapy/following{/other_user}","gists_url":"https://api.github.com/users/scrapy/gists{/gist_id}","starred_url":"https://api.github.com/users/scrapy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrapy/subscriptions","organizations_url":"https://api.github.com/users/scrapy/orgs","repos_url":"https://api.github.com/users/scrapy/repos","events_url":"https://api.github.com/users/scrapy/events{/privacy}","received_events_url":"https://api.github.com/users/scrapy/received_events","type":"Organization","site_admin":false},"repo":{"id":529502,"name":"scrapy","full_name":"scrapy/scrapy","owner":{"login":"scrapy","id":733635,"avatar_url":"https://avatars.githubusercontent.com/u/733635?v=3","gravatar_id":"","url":"https://api.github.com/users/scrapy","html_url":"https://github.com/scrapy","followers_url":"https://api.github.com/users/scrapy/followers","following_url":"https://api.github.com/users/scrapy/following{/other_user}","gists_url":"https://api.github.com/users/scrapy/gists{/gist_id}","starred_url":"https://api.github.com/users/scrapy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrapy/subscriptions","organizations_url":"https://api.github.com/users/scrapy/orgs","repos_url":"https://api.github.com/users/scrapy/repos","events_url":"https://api.github.com/users/scrapy/events{/privacy}","received_events_url":"https://api.github.com/users/scrapy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scrapy/scrapy","description":"Scrapy, a fast high-level web crawling & scraping framework for Python.","fork":false,"url":"https://api.github.com/repos/scrapy/scrapy","forks_url":"https://api.github.com/repos/scrapy/scrapy/forks","keys_url":"https://api.github.com/repos/scrapy/scrapy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scrapy/scrapy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scrapy/scrapy/teams","hooks_url":"https://api.github.com/repos/scrapy/scrapy/hooks","issue_events_url":"https://api.github.com/repos/scrapy/scrapy/issues/events{/number}","events_url":"https://api.github.com/repos/scrapy/scrapy/events","assignees_url":"https://api.github.com/repos/scrapy/scrapy/assignees{/user}","branches_url":"https://api.github.com/repos/scrapy/scrapy/branches{/branch}","tags_url":"https://api.github.com/repos/scrapy/scrapy/tags","blobs_url":"https://api.github.com/repos/scrapy/scrapy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scrapy/scrapy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scrapy/scrapy/git/refs{/sha}","trees_url":"https://api.github.com/repos/scrapy/scrapy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scrapy/scrapy/statuses/{sha}","languages_url":"https://api.github.com/repos/scrapy/scrapy/languages","stargazers_url":"https://api.github.com/repos/scrapy/scrapy/stargazers","contributors_url":"https://api.github.com/repos/scrapy/scrapy/contributors","subscribers_url":"https://api.github.com/repos/scrapy/scrapy/subscribers","subscription_url":"https://api.github.com/repos/scrapy/scrapy/subscription","commits_url":"https://api.github.com/repos/scrapy/scrapy/commits{/sha}","git_commits_url":"https://api.github.com/repos/scrapy/scrapy/git/commits{/sha}","comments_url":"https://api.github.com/repos/scrapy/scrapy/comments{/number}","issue_comment_url":"https://api.github.com/repos/scrapy/scrapy/issues/comments{/number}","contents_url":"https://api.github.com/repos/scrapy/scrapy/contents/{+path}","compare_url":"https://api.github.com/repos/scrapy/scrapy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scrapy/scrapy/merges","archive_url":"https://api.github.com/repos/scrapy/scrapy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scrapy/scrapy/downloads","issues_url":"https://api.github.com/repos/scrapy/scrapy/issues{/number}","pulls_url":"https://api.github.com/repos/scrapy/scrapy/pulls{/number}","milestones_url":"https://api.github.com/repos/scrapy/scrapy/milestones{/number}","notifications_url":"https://api.github.com/repos/scrapy/scrapy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scrapy/scrapy/labels{/name}","releases_url":"https://api.github.com/repos/scrapy/scrapy/releases{/id}","created_at":"2010-02-22T02:01:14Z","updated_at":"2016-01-21T15:41:23Z","pushed_at":"2016-01-21T15:40:42Z","git_url":"git://github.com/scrapy/scrapy.git","ssh_url":"git@github.com:scrapy/scrapy.git","clone_url":"https://github.com/scrapy/scrapy.git","svn_url":"https://github.com/scrapy/scrapy","homepage":"http://scrapy.org","size":31442,"stargazers_count":12152,"watchers_count":12152,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":3441,"mirror_url":null,"open_issues_count":337,"forks":3441,"open_issues":337,"watchers":12152,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/1637"},"html":{"href":"https://github.com/scrapy/scrapy/pull/1637"},"issue":{"href":"https://api.github.com/repos/scrapy/scrapy/issues/1637"},"comments":{"href":"https://api.github.com/repos/scrapy/scrapy/issues/1637/comments"},"review_comments":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/1637/comments"},"review_comment":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scrapy/scrapy/pulls/1637/commits"},"statuses":{"href":"https://api.github.com/repos/scrapy/scrapy/statuses/a06a5f00f4a62028416ada4919994efd7d439eb2"}}}}