Skip to content

Instantly share code, notes, and snippets.

@tkota0726
Created March 13, 2018 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkota0726/98795a0b09cef5e251b21d033d421301 to your computer and use it in GitHub Desktop.
Save tkota0726/98795a0b09cef5e251b21d033d421301 to your computer and use it in GitHub Desktop.
# -*- 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