Created
September 1, 2018 16:46
-
-
Save youjunjer/87e6981bbf7435515cba46019dcc3345 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'從網址取得要查詢的ISBN | |
Dim isbn As String = Request.QueryString("isbn") | |
'宣告webclient物件 | |
Dim webClient1 As New System.Net.WebClient | |
'將isbn送到博客來查詢,並讀取網頁原始碼到result中 | |
dim result as String = webClient1.DownloadString("https://search.books.com.tw/search/query/key/" & isbn) | |
'找出書籍封面的網址位置 | |
dim PicUrl as String = result.Substring(result.IndexOf("https://im1.book.com.tw"), result.IndexOf("&", result.IndexOf("https://im1.book.com.tw")) - result.IndexOf("https://im1.book.com.tw")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment