{"description":"python\u3067\u30ed\u30fc\u30ab\u30eb\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u8abf\u3079\u308b\u65b9\u6cd5 def get_local_ip_address(): from socket import socket, AF_INET, SOCK_DGRAM s = socket(AF_INET, SOCK_DGRAM) try: s.connect(('10.255.255.255', 1)) ipaddr = s.getsockname()[0] except Exception: ipaddr = '127.0.0.1' finally: s.close() return ipaddr print( get_local\u2026","width":"100%","url":"https://pyopyopyo.hatenablog.com/entry/2021/05/26/101533","title":"python\u3067\u81ea\u5206\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u8abf\u3079\u308b\u65b9\u6cd5","version":"1.0","height":"190","author_url":"https://blog.hatena.ne.jp/pyopyopyo/","type":"rich","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpyopyopyo.hatenablog.com%2Fentry%2F2021%2F05%2F26%2F101533\" title=\"python\u3067\u81ea\u5206\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u8abf\u3079\u308b\u65b9\u6cd5 - pyopyopyo - Linux\u3068\u304b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u899a\u3048\u66f8\u304d - \" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"pyopyopyo","image_url":null,"blog_url":"https://pyopyopyo.hatenablog.com/","categories":["python","programming"],"blog_title":"pyopyopyo - Linux\u3068\u304b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u899a\u3048\u66f8\u304d - ","provider_name":"Hatena Blog","published":"2021-05-26 10:15:33"}