Skip to content

Instantly share code, notes, and snippets.

@naosim
Created June 21, 2017 22:12
Show Gist options
  • Save naosim/7e6506f395b6faf4efacb219b8209f40 to your computer and use it in GitHub Desktop.
Save naosim/7e6506f395b6faf4efacb219b8209f40 to your computer and use it in GitHub Desktop.
pythonでcurl打ってjsonをパースする
#!/usr/bin/env python
import commands
import json
def pycurl(cmd):
c = "curl -s " + cmd
result = commands.getoutput(c)
return json.loads(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment