【发布时间】:2015-09-09 14:16:57
【问题描述】:
我想让这个 curl 命令在 Python 脚本中运行
curl -H "public-api-token: 049cxxxxxc026ef7364fa38c8792" -X PUT -d "urlToShorten=google.com" https://api.shorte.st/v1/data/url
但我现在知道怎么做。
【问题讨论】:
-
你有没有尝试过?您是否需要捕获该命令的输出。你看过任何关于运行命令的 python 文档吗?
标签: python json bash curl pycurl