{"id":720,"date":"2019-07-07T22:45:10","date_gmt":"2019-07-07T13:45:10","guid":{"rendered":"https:\/\/blog.mamimu.me\/fishblue\/?p=720"},"modified":"2022-10-02T07:00:40","modified_gmt":"2022-10-01T22:00:40","slug":"python%e3%81%a7http%e3%81%ae%e3%82%b9%e3%83%86%e3%83%bc%e3%82%bf%e3%82%b9%e3%82%b3%e3%83%bc%e3%83%89%e3%82%92%e7%a2%ba%e8%aa%8d","status":"publish","type":"post","link":"https:\/\/blog.mamimu.me\/fishblue\/?p=720","title":{"rendered":"python\u3067http\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9\u3092\u78ba\u8a8d"},"content":{"rendered":"<p>1.\u5148\u305a\u3001requests\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n$ pip install requests<\/p>\n<p>2.\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210<br \/>\n$ cat test.py<\/p>\n<p>#!\/usr\/bin\/python3.6<\/p>\n<p>import requests<br \/>\nr = requests.get(&#8216;http:\/\/hogehoge.com&#8217;)\u3000\u3000\u3000\u2190\u2605hogehoge.com\u306f\u9069\u5b9c\u5909\u66f4\u3059\u308b<br \/>\nprint(r.status_code)<\/p>\n<p>3.\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c<br \/>\n$ python3.6 test.py<br \/>\n200<br \/>\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:468px;height:60px\"\n     data-ad-client=\"ca-pub-9128529039742412\"\n     data-ad-slot=\"0240515414\"><\/ins><br \/>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u5148\u305a\u3001requests\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb $ pip install requests 2.\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210 $ cat test.py #!\/usr\/bin\/python3.6 import requests<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,9,4],"tags":[],"class_list":["post-720","post","type-post","status-publish","format-standard","hentry","category-linux","category-python","category-4"],"_links":{"self":[{"href":"https:\/\/blog.mamimu.me\/fishblue\/index.php?rest_route=\/wp\/v2\/posts\/720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.mamimu.me\/fishblue\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mamimu.me\/fishblue\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mamimu.me\/fishblue\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mamimu.me\/fishblue\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=720"}],"version-history":[{"count":0,"href":"https:\/\/blog.mamimu.me\/fishblue\/index.php?rest_route=\/wp\/v2\/posts\/720\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mamimu.me\/fishblue\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mamimu.me\/fishblue\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mamimu.me\/fishblue\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}