一区二区三区在线-一区二区三区亚洲视频-一区二区三区亚洲-一区二区三区午夜-一区二区三区四区在线视频-一区二区三区四区在线免费观看

腳本之家,腳本語言編程技術(shù)及教程分享平臺!
分類導航

Python|VBS|Ruby|Lua|perl|VBA|Golang|PowerShell|Erlang|autoit|Dos|bat|

服務器之家 - 腳本之家 - VBS - bookfind 通過ISBN序號獲取圖書連接的書名與作者的vbs代碼

bookfind 通過ISBN序號獲取圖書連接的書名與作者的vbs代碼

2020-08-05 10:36VBS代碼網(wǎng) VBS

bookfind 通過ISBN序號獲取圖書連接的書名與作者的vbs代碼,類似小偷程序,通過正則匹配,雖然現(xiàn)在已經(jīng)無法使用,但代碼不錯,原理都有

核心代碼:

復制代碼 代碼如下:


If WScript.Arguments.UnNamed.Count <> 1 Then Syntax
If WScript.Arguments.Named.Count > 1 Then Syntax
blnTd = False
If WScript.Arguments.Named.Count = 1 Then
If UCase( WScript.Arguments.Named( 0 ) ) = "/TD" Then
blnTd = True
Else
Syntax
End If
End If
strISBN = WScript.Arguments.UnNamed( 0 )
strPgTitle = TitleFromHTML( "http://www.amazon.com/gp/product/" & strISBN & "/" )
strPattern = "Amazon.com: (.*): Books: (.*)$"
strTitle = RegExpVal( strPattern, strPgTitle, 0 )
strAuthor = RegExpVal( strPattern, strPgTitle, 1 )
If blnTd Then
strMsg = strISBN & vbTab & strTitle & vbTab & strAuthor & vbCrLf
Else
strMsg = vbCrLf & "Title : " & strTitle _
& vbCrLf & "Author : " & strAuthor _
& vbCrLf & "ISBN : " & strISBN
End If
WScript.Echo strMsg
Function RegExpVal( strPattern, strString, idx )
On Error Resume Next
Dim regEx, Match, Matches, RetStr
Set regEx = New RegExp
regEx.Pattern = strPattern
regEx.IgnoreCase = True
regEx.Global = True
Set Matches = regEx.Execute( strString )
RegExpVal = Matches( 0 ).SubMatches( idx )
End Function
Function TitleFromHTML( strURL )
Set ie = CreateObject( "InternetExplorer.Application" )
ie.Navigate strURL
Do Until ie.ReadyState = 4
WScript.Sleep 10
Loop
TitleFromHTML = ie.Document.Title
ie.Quit
End Function
Sub Syntax
strMsg = strMsg & vbCrLf & "BookFind.vbs, Version 1.11" & vbCrLf _
& "Display book title and author name for the specified ISBN number." & vbCrLf & vbCrLf _
& "Usage: CSCRIPT //NOLOGO BOOKFIND.VBS isbn [ /TD ]" & vbCrLf & vbCrLf _
& "Where: ""isbn"" is the ISBN (or ASIN) of the book to search for" & vbCrLf _
& " /TD changes the output format to tab delimited" & vbCrLf & vbCrLf _
& "Note: This script uses Amazon's web site to look up author and title." & vbCrLf _
& " To be precise, the data is extracted from the title of the page" & vbCrLf _
& " with URL http://www.amazon.com/gp/product/ followed by the ISBN." & vbCrLf _
& " That means this script will fail when Amazon changes the URLs." & vbCrLf & vbCrLf _
& "Written by Rob van der Woude" & vbCrLf _
& "http://www.robvanderwoude.com"
Wscript.Echo( strMsg )
Wscript.Quit( 1 )
End Sub


使用方法:
CSCRIPT //NOLOGO BOOKFIND.VBS isbn [ /TD ]
Where: "isbn" is the ISBN (or ASIN) of the book to search for
/TD changes the output format to tab delimited
Note: This script uses Amazon's web site to look up author and title.
To be precise, the data is extracted from the title of the page
with URL http://www.amazon.com/gp/product/ followed by the ISBN.
That means this script will fail when Amazon changes the URLs.

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: 精久久 | 变态人shou交小说 | 亚洲精品 欧美 | 男人叼女人的痛爽视频免费 | 吃瓜视频在线观看 | 欧美一级在线视频 | 日本在线视频网址 | 免费高清视频在线观看 | sese在线播放 | 亚洲精品国产成人7777 | 精品国产一区二区三区在线观看 | 亚洲精品一区二区三区在线播放 | 日本中文字幕二区三区 | 99久久国产综合精品麻豆 | 91porny.首页| 四虎1515hhh co m | 欧美一级专区免费大片俄罗斯 | 成人国产午夜在线视频 | 亚洲人成网站在线观看妞妞网 | 水野朝阳厨房系列在线观看 | 好猛好紧好硬使劲好大刺激视频 | 69罗莉视频在线观看 | 14一18cad中国大学生 | 丝袜老师好湿好紧我要进去了 | 热穴高校| 精品一产品大全 | 男人女人性生活视频 | 2019理论韩国理论中文 | 男人晚上适合偷偷看的污污 | 热99精品视频 | 日韩免费观看 | 深夜网站在线观看 | 亚洲阿v天堂2018在线观看 | 亚洲va天堂va国产va久久 | 国产精品视频2020 | 国产精品色拉拉免费看 | 亚洲男人的天堂在线 | 四虎1515hhh co m| 激情艳妇 | 成人永久免费视频 | 冰漪丰满大乳人体图片欣赏 |