{"id":3166,"date":"2016-02-17T01:44:45","date_gmt":"2016-02-17T01:44:45","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=3166"},"modified":"2016-02-17T01:44:45","modified_gmt":"2016-02-17T01:44:45","slug":"https-request-with-python","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/https-request-with-python\/","title":{"rendered":"HTTPS request with python"},"content":{"rendered":"<p>Run this to get all the HTTP libraries involved:<\/p>\n<pre lang=\"bash\">\nsudo easy_install request urllib3 pyopenssl ndg-httpsclient pyasn1\n<\/pre>\n<p>Then you can do HTTPs requests: <\/p>\n<pre lang=\"python\">\nurl = \\\n   \"https:\/\/raw.githubusercontent.com\/scala\/\" +\n   \"scala\/6d09a1ba5fffadd1d886afb66ab4496291fda3dd\/\" +      \n   \"src\/library\/scala\/util\/control\/Breaks.scala\"\n\nimport requests\ncode = requests.get(url).content\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Run this to get all the HTTP libraries involved: sudo easy_install request urllib3 pyopenssl ndg-httpsclient pyasn1 Then you can do HTTPs requests: url = \\ &#8220;https:\/\/raw.githubusercontent.com\/scala\/&#8221; + &#8220;scala\/6d09a1ba5fffadd1d886afb66ab4496291fda3dd\/&#8221; + &#8220;src\/library\/scala\/util\/control\/Breaks.scala&#8221; import requests code = requests.get(url).content<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4],"tags":[447,528],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/3166"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=3166"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/3166\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=3166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=3166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=3166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}