Created
March 13, 2018 17:24
-
-
Save tkota0726/98795a0b09cef5e251b21d033d421301 to your computer and use it in GitHub Desktop.
This file contains 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
# -*- coding: utf-8 - | |
import json | |
import requests | |
import sys | |
import pprint | |
argv = sys.argv | |
# print(type(argv[1])) | |
base = "http://46.101.137.28:4000/api" | |
url = base + argv[1] | |
def main(): | |
try: | |
data = requests.get(url).json() | |
pprint.pprint(data) | |
except Exception: | |
print("Error occured") | |
pass | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment