From e365b1310e3be0700f75e7330a1d1351d56cce5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=B0=A7?= Date: Tue, 15 Mar 2022 16:38:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Python=E8=B0=83=E7=94=A8?= =?UTF-8?q?=EF=BC=8C=E6=95=B0=E6=8D=AE=E5=88=86=E6=9E=90=E5=B8=88=E5=B8=B8?= =?UTF-8?q?=E5=86=99Python?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加以下内容: ### Python调用 ``` import requests URL='https://wangzc.wang/smAddress' data=lambda x : r'{"address":"' + x + '"}' address=r'陕西省西安市雁塔区丈八沟街道高新四路高新大都荟710061 刘国良 13593464918 211381198512096810' # address requests.post(url=URL,data=data(address).encode('utf-8')) print(res.json()) # output ``` --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 7ecf213..8108a7a 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,16 @@ import smart from 'address-smart-parse' smart("陕西省西安市雁塔区丈八沟街道高新四路高新大都荟710061 刘国良 13593464918 211381198512096810") ``` +### Python调用 +``` +import requests +URL='https://wangzc.wang/smAddress' +data=lambda x : r'{"address":"' + x + '"}' +address=r'陕西省西安市雁塔区丈八沟街道高新四路高新大都荟710061 刘国良 13593464918 211381198512096810' # address +requests.post(url=URL,data=data(address).encode('utf-8')) +print(res.json()) # output +``` + ## 生成数据格式 ```json