From f60bbb1881e5301ac5d6db6dfa51edc1d4488a52 Mon Sep 17 00:00:00 2001 From: fofolee Date: Fri, 10 Apr 2020 17:48:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=8B=E6=9C=BA=E5=8F=B7?= =?UTF-8?q?=E3=80=81IP=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CommandCollections/手机号、IP 归属地查询.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 CommandCollections/手机号、IP 归属地查询.json diff --git a/CommandCollections/手机号、IP 归属地查询.json b/CommandCollections/手机号、IP 归属地查询.json new file mode 100644 index 0000000..1af0f5e --- /dev/null +++ b/CommandCollections/手机号、IP 归属地查询.json @@ -0,0 +1 @@ +{"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"} \ No newline at end of file