{"action":"created","issue":{"url":"https://api.github.com/repos/sopel-irc/sopel/issues/988","labels_url":"https://api.github.com/repos/sopel-irc/sopel/issues/988/labels{/name}","comments_url":"https://api.github.com/repos/sopel-irc/sopel/issues/988/comments","events_url":"https://api.github.com/repos/sopel-irc/sopel/issues/988/events","html_url":"https://github.com/sopel-irc/sopel/pull/988","id":125073469,"number":988,"title":"SNI support using Python requests for .url","user":{"login":"anarcat","id":796623,"avatar_url":"https://avatars.githubusercontent.com/u/796623?v=3","gravatar_id":"","url":"https://api.github.com/users/anarcat","html_url":"https://github.com/anarcat","followers_url":"https://api.github.com/users/anarcat/followers","following_url":"https://api.github.com/users/anarcat/following{/other_user}","gists_url":"https://api.github.com/users/anarcat/gists{/gist_id}","starred_url":"https://api.github.com/users/anarcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anarcat/subscriptions","organizations_url":"https://api.github.com/users/anarcat/orgs","repos_url":"https://api.github.com/users/anarcat/repos","events_url":"https://api.github.com/users/anarcat/events{/privacy}","received_events_url":"https://api.github.com/users/anarcat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-05T23:06:53Z","updated_at":"2016-01-06T13:08:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sopel-irc/sopel/pulls/988","html_url":"https://github.com/sopel-irc/sopel/pull/988","diff_url":"https://github.com/sopel-irc/sopel/pull/988.diff","patch_url":"https://github.com/sopel-irc/sopel/pull/988.patch"},"body":"without this, SNI-enabled sites, which are becoming more and more\r\npopular, are not displayed by the URL plugin\r\n\r\na good site to test with is: https://sni.velox.ch/\r\n\r\nthe requests API is similar enough to the `web.get` API to replace it,\r\nbut that is left to another pull request, as other plugins may not\r\nrequire SNI support because they probably don't encounter the same\r\nvariety of sites as `.url`"},"comment":{"url":"https://api.github.com/repos/sopel-irc/sopel/issues/comments/169319717","html_url":"https://github.com/sopel-irc/sopel/pull/988#issuecomment-169319717","issue_url":"https://api.github.com/repos/sopel-irc/sopel/issues/988","id":169319717,"user":{"login":"embolalia","id":1076927,"avatar_url":"https://avatars.githubusercontent.com/u/1076927?v=3","gravatar_id":"","url":"https://api.github.com/users/embolalia","html_url":"https://github.com/embolalia","followers_url":"https://api.github.com/users/embolalia/followers","following_url":"https://api.github.com/users/embolalia/following{/other_user}","gists_url":"https://api.github.com/users/embolalia/gists{/gist_id}","starred_url":"https://api.github.com/users/embolalia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embolalia/subscriptions","organizations_url":"https://api.github.com/users/embolalia/orgs","repos_url":"https://api.github.com/users/embolalia/repos","events_url":"https://api.github.com/users/embolalia/events{/privacy}","received_events_url":"https://api.github.com/users/embolalia/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T13:08:50Z","updated_at":"2016-01-06T13:08:50Z","body":"I'll take a more detailed look at the PR later, but I just wanted to answer a few points real quick:\r\n\r\n* Rather than using requests in `sopel.web`, we're going to deprecate it and suggest using requests instead. The module is kind of messy anyway, and there's no need to have a wrapper around an already pretty good API. (This has already been talked about here and there, and is a longer term plan, but just hasn't been acted on because it's somewhat low priority.)\r\n* The ca_certs config setting is there because there's no reliable standardization on the location. It gets set somewhere in the bot's startup (when it's reading the config). Yes, this is hideous. But at least at the time, there was no cross-platform solution that didn't involve a hard dependency for core functionality (which we've been trying to avoid).\r\n* The current code does not assume the content is text for size limiting. It reads howevermany bytes (not characters), stops, and *then* assumes the bytes are text. If I'm reading it correctly, what your code is doing will require there to be an occasional `0x0A` byte, or it will never hit the limit. What if it's running on a Raspberry Pi, and someone posts a link to a 2GB video file?"}}