mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-27 03:15:02 +08:00
1 line
883 B
JSON
1 line
883 B
JSON
{"base64Ico":"","cmd":"#coding:utf8\nimport re\nimport requests\n\nquery = \"{{input}}\"\nif re.findall(r'^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$', query):\n\tg = requests.get('https://whois.pconline.com.cn/ip.jsp?ip=' + query).content\n\tprint g.decode(\"gb18030\").encode(\"utf8\")\nelse:\n\tg = requests.get('https://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=' + query).content\n\tprint g.decode(\"gb18030\").encode(\"utf8\")","features":{"cmds":[{"label":"手机号、IP 归属地查询","match":"/(^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$)|(^1[345678]\\d{9}$)/","minNum":1,"type":"regex"}],"code":"regex_tr29og8bdh","explain":"手机号、IP 归属地查询","icon":"logo/python.png"},"hasSubInput":false,"noKeyword":true,"output":"text","program":"python"} |