İnternette arama yaparak resim url si çekme

Katılım
30 Ocak 2024
Mesajlar
4
Excel Vers. ve Dili
Microsoft 2021
Excel de kitap takip listesi oluşturuyorum.
İstediğim şey şu:

A sütununda kitapların isbn numaraları yazacak
B sütununa da yanında isbn no yazan kitabın resim url si gelecek

kitaplar 5 10 tane olsa kendim yazarım ama 4 5 bin kitap var yaklaşık
Bunu nası yaparım
 

beab05

Özel Üye
Katılım
19 Mart 2007
Mesajlar
1,373
Excel Vers. ve Dili
Office 2013
Merhaba;

ISBN ye göre sonuç döndüren bir apiden alabilirsiniz.

Örneğin Google api si ile Othello kitabı isbn'sine göre aşağıdaki gibi dönüş olmaktadır.






JSON:
{
kind: "books#volumes",
totalItems: 1,
items: [
{
kind: "books#volume",
id: "inF7oAEACAAJ",
etag: "6DYiObohZ9M",
selfLink: "https://www.googleapis.com/books/v1/volumes/inF7oAEACAAJ",
volumeInfo: {
title: "Othello",
authors: [
"William Shakespeare"
],
publishedDate: "2014-09-01",
industryIdentifiers: [
{
type: "ISBN_10",
identifier: "9944884510"
},
{
type: "ISBN_13",
identifier: "9789944884518"
}
],
readingModes: {
text: false,
image: false
},
pageCount: 160,
printType: "BOOK",
maturityRating: "NOT_MATURE",
allowAnonLogging: false,
contentVersion: "preview-1.0.0",
imageLinks: {
smallThumbnail: "http://books.google.com/books/content?id=inF7oAEACAAJ&printsec=frontcover&img=1&zoom=5&source=gbs_api",
thumbnail: "http://books.google.com/books/content?id=inF7oAEACAAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api"
},
language: "tr",
previewLink: "http://books.google.com.tr/books?id=inF7oAEACAAJ&dq=isbn:9789944884518&hl=&cd=1&source=gbs_api",
infoLink: "http://books.google.com.tr/books?id=inF7oAEACAAJ&dq=isbn:9789944884518&hl=&source=gbs_api",
canonicalVolumeLink: "https://books.google.com/books/about/Othello.html?hl=&id=inF7oAEACAAJ"
},
saleInfo: {
country: "TR",
saleability: "NOT_FOR_SALE",
isEbook: false
},
accessInfo: {
country: "TR",
viewability: "NO_PAGES",
embeddable: false,
publicDomain: false,
textToSpeechPermission: "ALLOWED",
epub: {
isAvailable: false
},
pdf: {
isAvailable: false
},
webReaderLink: "http://play.google.com/books/reader?id=inF7oAEACAAJ&hl=&source=gbs_api",
accessViewStatus: "NONE",
quoteSharingAllowed: false
}
}
]
}
 
Katılım
30 Ocak 2024
Mesajlar
4
Excel Vers. ve Dili
Microsoft 2021
Merhaba;

ISBN ye göre sonuç döndüren bir apiden alabilirsiniz.

Örneğin Google api si ile Othello kitabı isbn'sine göre aşağıdaki gibi dönüş olmaktadır.






JSON:
{
kind: "books#volumes",
totalItems: 1,
items: [
{
kind: "books#volume",
id: "inF7oAEACAAJ",
etag: "6DYiObohZ9M",
selfLink: "https://www.googleapis.com/books/v1/volumes/inF7oAEACAAJ",
volumeInfo: {
title: "Othello",
authors: [
"William Shakespeare"
],
publishedDate: "2014-09-01",
industryIdentifiers: [
{
type: "ISBN_10",
identifier: "9944884510"
},
{
type: "ISBN_13",
identifier: "9789944884518"
}
],
readingModes: {
text: false,
image: false
},
pageCount: 160,
printType: "BOOK",
maturityRating: "NOT_MATURE",
allowAnonLogging: false,
contentVersion: "preview-1.0.0",
imageLinks: {
smallThumbnail: "http://books.google.com/books/content?id=inF7oAEACAAJ&printsec=frontcover&img=1&zoom=5&source=gbs_api",
thumbnail: "http://books.google.com/books/content?id=inF7oAEACAAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api"
},
language: "tr",
previewLink: "http://books.google.com.tr/books?id=inF7oAEACAAJ&dq=isbn:9789944884518&hl=&cd=1&source=gbs_api",
infoLink: "http://books.google.com.tr/books?id=inF7oAEACAAJ&dq=isbn:9789944884518&hl=&source=gbs_api",
canonicalVolumeLink: "https://books.google.com/books/about/Othello.html?hl=&id=inF7oAEACAAJ"
},
saleInfo: {
country: "TR",
saleability: "NOT_FOR_SALE",
isEbook: false
},
accessInfo: {
country: "TR",
viewability: "NO_PAGES",
embeddable: false,
publicDomain: false,
textToSpeechPermission: "ALLOWED",
epub: {
isAvailable: false
},
pdf: {
isAvailable: false
},
webReaderLink: "http://play.google.com/books/reader?id=inF7oAEACAAJ&hl=&source=gbs_api",
accessViewStatus: "NONE",
quoteSharingAllowed: false
}
}
]
}

Hocam cevabınız için teşekkür ederim

Öncelikle ben bu konularda biraz cahilim makro kısmında rica etsem biraz daha basit anlatabilir misiniz ?
İnternette sabahtan beri araştırma yapıyorum ama iş makro kısmına gelince film kopuyo bende.
1. Galiba bi Api key almamız lazım bunu nasıl alıcam (open library sitesinde de lazım oluyodu)
2. Bu kodu excelde nasıl uygulayacğım.
3. ben excele resim yüklemek istemiyorum resmin url sini getirmek istiyorum çünkü resim yüklesem yüzlerce kitap var dosya boyutu çok artar
 

beab05

Özel Üye
Katılım
19 Mart 2007
Mesajlar
1,373
Excel Vers. ve Dili
Office 2013
Merhaba;

Siz gerekli düzenlemeleri yaparsınız. Çok aceleye geldi. Resim url si olmayanları vs. vs....

Aşağıdaki linkten indirebilirsiniz.

https://s6.dosya.tc/server18/brg2ni/ISBN_BEAB.rar.html


C#:
Sub GetIsbnImage()
    Dim i As Integer
    Dim http As Object
    Dim responseText As String
    Dim startIndex As Integer
    Dim endIndex As Integer
    Dim isbn As String
    Dim thumbnailURL As String
   
    Set http = CreateObject("MSXML2.XMLHTTP")
   
    For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
        isbn = Cells(i, 1).Value
        If isbn <> "" Then
            http.Open "GET", "https://www.googleapis.com/books/v1/volumes?q=isbn:" & isbn, False
            http.send
           
            responseText = http.responseText
           
            startIndex = InStr(responseText, """thumbnail"": """) + Len("""thumbnail"": """)
            endIndex = InStr(startIndex, responseText, """")
            thumbnailURL = Mid(responseText, startIndex, endIndex - startIndex)
           
            If startIndex > 0 And endIndex > 0 Then
                Cells(i, 2).Value = thumbnailURL
            Else
                Cells(i, 2).Value = "Resim Linki Bulunamadı!"
            End If
        End If
    Next i
   
    Set http = Nothing
End Sub
 

Ekli dosyalar

Son düzenleme:
Üst