mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-10 23:54:57 +08:00
1 line
469 B
JSON
1 line
469 B
JSON
{"features":{"code":"window_2kkl16x3wug","explain":"ping当前域名","cmds":[{"label":"ping当前域名","type":"window","match":{"app":["msedge.exe"]}}],"icon":"logo/python.png"},"program":"python","cmd":"#coding:utf8\nimport os\nimport re\nhost = re.findall(r'(.*\\/\\/|^)(.*?)(:|/|$).*', \"{{BrowserUrl}}\")[0][1]\nif {{isWin}}:\n\tcmd = \"ping -n 2 %s\" %host\nelse:\n\tcmd = \"ping -c 2 %s\" %host\nprint os.popen(cmd).read()","output":"text","hasSubInput":false} |