濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > bookfind 通過(guò)ISBN序號(hào)獲取圖書連接的書名與作者的vbs代碼

bookfind 通過(guò)ISBN序號(hào)獲取圖書連接的書名與作者的vbs代碼

熱門標(biāo)簽:海外美發(fā)店地圖標(biāo)注 打電話的外呼系統(tǒng)貴不貴 前鋒辦理400電話申請(qǐng) 新密防封卡外呼系統(tǒng)違法嗎 辦理膠州400電話財(cái)稅 加盟電銷機(jī)器人好的品牌 百度地圖標(biāo)注怎么卸載 外呼營(yíng)銷下單系統(tǒng) 陜西高頻外呼回?fù)芟到y(tǒng)哪家好
核心代碼:
復(fù)制代碼 代碼如下:

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.
您可能感興趣的文章:
  • javascript字符串與數(shù)組轉(zhuǎn)換匯總
  • Javascript進(jìn)制轉(zhuǎn)換實(shí)例分析
  • Javascript實(shí)現(xiàn)顏色rgb與16進(jìn)制轉(zhuǎn)換的方法
  • JavaScript轉(zhuǎn)換二進(jìn)制編碼為ASCII碼的方法
  • JavaScript將字符串轉(zhuǎn)換為整數(shù)的方法
  • php根據(jù)isbn書號(hào)查詢amazon網(wǎng)站上的圖書信息的示例
  • PHP校驗(yàn)ISBN碼的函數(shù)代碼
  • JavaScript實(shí)現(xiàn)將UPC轉(zhuǎn)換成ISBN的方法

標(biāo)簽:梅州 河南 伊春 牡丹江 四平 武威 阜陽(yáng) 咸陽(yáng)

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《bookfind 通過(guò)ISBN序號(hào)獲取圖書連接的書名與作者的vbs代碼》,本文關(guān)鍵詞  bookfind,通過(guò),ISBN,序號(hào),獲取,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《bookfind 通過(guò)ISBN序號(hào)獲取圖書連接的書名與作者的vbs代碼》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于bookfind 通過(guò)ISBN序號(hào)獲取圖書連接的書名與作者的vbs代碼的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    二手房| 镇原县| 南部县| 南平市| 遂昌县| 峡江县| 吕梁市| 高邑县| 百色市| 井冈山市| 陵川县| 都兰县| 甘泉县| 新余市| 秦皇岛市| 隆德县| 长兴县| 黎平县| 马龙县| 黎城县| 延吉市| 永川市| 彭州市| 循化| 铜鼓县| 麻栗坡县| 阿拉善盟| 郎溪县| 汪清县| 河间市| 福州市| 儋州市| 漳州市| 灵丘县| 宁陵县| 宿迁市| 盖州市| 分宜县| 卓尼县| 襄汾县| 吉林省|