|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Sub c()
- str1 = "{""data"":""32aaae5a1571ec081caba00bc630c88f28d148e9a400cacb69786fe5"
- str1 = str1 & "b282be38a70b8953e2afa0815402f213cb40bd1d5c7fa46a65746c2990b25"
- str1 = str1 & "ed6142355d61ac291ab971106d21d4e4f75a77de13245a7f3c96caf128fd4"
- str1 = str1 & "76269260832f51"",""key_id"":""47"",""sign"":""8ec3356b"",""pa"
- str1 = str1 & "ge"":1,""size"":10,""search"":"""
- For n = 2 To [a65536].End(3).Row
- url = Cells(n, 1).Value
- hm = Split(url, "=")(1)
- str1 = str1 & hm & """}"
- With CreateObject("WinHttp.WinHttpRequest.5.1")
- .Open "post", "https://haoma.baidu.com/api/v1/search", False
- .setRequestHeader "Referer", url
- .Send (str1)
- strtext = .responsetext
- End With
- Debug.Print strtext
- S = Split(Split(strtext, """province"":""")(1), """")(0)
- S = S & Split(Split(strtext, """city"":""")(1), """")(0)
- Cells(n, 3) = S & "/" & Split(Split(strtext, """operator"":""")(1), """")(0)
- Cells(n, 2) = "'" & hm
- Next
- End Sub
复制代码 |
|