幽灵资源网 Design By www.bzswh.com
核心代码:
复制代码 代码如下:
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.
标签:
ISBN

幽灵资源网 Design By www.bzswh.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
幽灵资源网 Design By www.bzswh.com

稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!

昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。

这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。

而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?