managai / pif Goto Github PK
View Code? Open in Web Editor NEWThis project forked from barseghyanartur/pif
Public IP address checker.
Home Page: https://pypi.python.org/pypi/pif
This project forked from barseghyanartur/pif
Public IP address checker.
Home Page: https://pypi.python.org/pypi/pif
from json import load
from urllib2 import urlopen
my_ip = load(urlopen('https://api.ipify.org/?format=json'))['ip']
Power of this service results from lack of limits (there is no rate limiting), infrastructure (placed on Heroku, with high availability in mind) and flexibility (works for both IPv4 and IPv6).
from json import load
from urllib2 import urlopen
my_ip = load(urlopen('http://jsonip.com'))['ip']
Seemingly the sole purpose of this domain is to return IP address in JSON.
import urllib
ip = urllib.urlopen('http://www.networksecuritytoolkit.org/nst/tools/ip.php').read()
ip = ip.rstrip()
print ip
issue with
get-public-ip -c whatismyip.com -v 1
look at http://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning
from urllib2 import urlopen
my_ip = urlopen('http://ip.42.pl/raw').read()
This is the first option I have found. It is very convenient for scripts, you don't need JSON parsing here.
import urllib2
ret = urllib2.urlopen('https://enabledns.com/ip')
print ret.read()
from json import load
from urllib2 import urlopen
my_ip = load(urlopen('http://httpbin.org/ip'))['origin']
httpbin.org is service I often recommend to junior developers to use for testing their scripts / applications.
import urllib
ip = urllib.urlopen('http://biranchi.com/ip.php').read()
print ip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.