In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you "vbs how to achieve Baidu Little Assistant", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "how to achieve Baidu Little Assistant vbs" this article.
Run it to select directly:
1. I want to answer; 2. Song search; 3, news search; 4. Web search; 5. Post bar search; 6. Know search; 7. Image search; 8. Video search; 9; Encyclopedia search
Then enter the content you need to search and automatically open it and go to the specified URL for automatic search.
The code is as follows:
Xz=InputBox ("1. I want to answer; 2. Song search; 3, News search;" & Chr (13) & "4. Web search; 5. Post bar search; 6. Know search;" & Chr (13) & "7. Image search; 8. Video search; 9; encyclopedia search;", "Baidu assistant [Null_vbt]", ")
If Len (xz) = 0 Then
MsgBox "No choice, script exit!" , 64, "error"
WScript.Quit
Else
Select Case xz
Case 1
X=Urlcode (InputBox ("Please enter the question to answer", "Baidu I want to answer", "))
If Len (x) = 0 Then
MsgBox "No content detected, script exited!" , 64, "error"
WScript.Quit
Else
Strurl= "http://zhidao.baidu.com/q?word=" & x &" & ct=17&pn=0&tn=ikaslist&rn=10&lm=65536&fr=answersearch_0 "
End if
Case 2
X=Urlcode (InputBox ("Please enter the name of the song to search", "Baidu song search", "))
If Len (x) = 0 Then
MsgBox "No content detected, script exited!" , 64, "error"
WScript.Quit
Else
Strurl= "http://mp3.baidu.com/m?f=ms&tn=baidump3&ct=134217728&lf=&rn=&word=" & x &" & lm=-1 "
End if
Case 3
X=Urlcode (InputBox ("Please enter the news title to search", "Baidu News search", "))
If Len (x) = 0 Then
MsgBox "No content detected, script exited!" , 64, "error"
WScript.Quit
Else
Strurl= "http://news.baidu.com/ns?cl=2&rn=20&tn=news&word=" & x &" & twee1 "
End if
Case 4
X=Urlcode (InputBox ("Please enter what you want to search", "Baidu Web search", "))
If Len (x) = 0 Then
MsgBox "No content detected, script exited!" , 64, "error"
WScript.Quit
Else
Strurl= "http://www.baidu.com/s?cl=3&wd=" & x
End if
Case 5
X=Urlcode (InputBox ("Please enter the title of the post to search", "Baidu Tieba search", "))
If Len (x) = 0 Then
MsgBox "No content detected, script exited!" , 64, "error"
WScript.Quit
Else
Strurl= "http://tieba.baidu.com/f?kw=" & x
End if
Case 6
X=InputBox ("Please enter the known title to search", "Baidu knows to search", ")
If Len (x) = 0 Then
MsgBox "No content detected, script exited!" , 64, "error"
WScript.Quit
Else
Strurl= "http://zhidao.baidu.com/q?ct=17&pn=0&tn=ikaslist&rn=10&word=" & x
End if
Case 7
X=Urlcode (InputBox ("Please enter the title of the image to search", "Baidu Image search", "))
If Len (x) = 0 Then
MsgBox "No content detected, script exited!" , 64, "error"
WScript.Quit
Else
Strurl= "http://image.baidu.com/i?tn=baiduimage&ct=201326592&lm=-1&cl=2&word=" & x &" & Tencent 3 "
End if
Case 8
X=Urlcode (InputBox ("Please enter the video title to search", "Baidu Video search", "))
If Len (x) = 0 Then
MsgBox "No content detected, script exited!" , 64, "error"
WScript.Quit
Else
Strurl= "http://video.baidu.com/v?ct=301989888&rn=20&pn=0&db=0&s=7&word=" & x
End if
Case 9
X=Urlcode (InputBox ("Please enter the encyclopedia title to search", "Baidu encyclopedia search", "))
If Len (x) = 0 Then
MsgBox "No content detected, script exited!" , 64, "error"
WScript.Quit
Else
Strurl= "http://baike.baidu.com/w?ct=17&lm=0&tn=baiduWikiSearch&pn=0&rn=10&word=" & x
End if
End Select
End if
Set objIe = CreateObject ("InternetExplorer.Application")
Objie.visible=true
ObjIe.Navigate strUrl
Function Urlcode (InpStr)
Dim InpAsc,I
For I = 1 To Len (InpStr)
InpAsc = Asc (Mid (InpStr, I, 1))
If ((InpAsc
< 58) And (InpAsc >47)) Or ((InpAsc)
< 91) And (InpAsc >64)) Or ((InpAsc)
< 123) And (InpAsc >96) Then
Urlcode = Urlcode & Chr (InpAsc)
Else
Urlcode = Urlcode & "%" & mid (Trim (Hex (InpAsc)), 1) & "%" & mid (Trim (Hex (InpAsc)), 3)
End If
Next
End Function
The above is all the content of this article "how to realize Baidu Little Assistant with vbs". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.