Created
March 20, 2016 08:16
-
-
Save Lvl4Sword/ad68a935ce4a1f4d4949 to your computer and use it in GitHub Desktop.
DuckDuckGo IP Lookup
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 | |
import json | |
raw = requests.get('https://api.duckduckgo.com/?q=ip&format=json') | |
raw_json = json.loads(raw.text) | |
answer = raw_json["Answer"].split(' ') | |
print (' '.join(answer[:5])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment