How To Use Python To Get Your External IP

I was having some issues involving losing connectivity to a system of mine due to a dynamic IP. Normally one would just use a dynamic DNS service to solve the problem, but in this case there were complications that kept that from being a solution.

So that’s where Python comes in. I threw this “solution” (It’s in quotes for a reason) together, which goes to my own rudimentary IP-finding site, pulls my address, and returns it to me. Here’s the code: