0
0
forked from tdwojak/Python2018
Python2018/labs04/examples/myip.py

12 lines
273 B
Python
Raw Normal View History

2018-05-12 13:16:05 +02:00
#!/usr/bin/env python
"""
This simple script fetches your IP as seen by web pages, and displays it.
Execute this script locally like that:
$ curl -s https://raw.github.com/gist/3389407/myip.py | python
"""
import requests
print(requests.get('http://ip.42.pl/raw').text)