This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import requests and regex library | |
import requests | |
import re | |
def get_external_ip(): | |
# Make a request to checkip.dyndns.org as proposed | |
# in https://en.bitcoin.it/wiki/Satoshi_Client_Node_Discovery#DNS_Addresses | |
response = requests.get('http://checkip.dyndns.org').text | |
# Filter the response with a regex for an IPv4 address |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.