Skip to content

Commit

Permalink
[新增] 香港大学数字图书馆
Browse files Browse the repository at this point in the history
  • Loading branch information
zhudw committed May 5, 2023
1 parent 5ac2828 commit 64aa100
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/hkulib.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"net/http/cookiejar"
"net/url"
"regexp"
"strings"
)

type Hkulib struct {
Expand Down Expand Up @@ -147,7 +148,9 @@ func (r *Hkulib) getCanvases(sUrl string, jar *cookiejar.Jar) (canvases []string
for _, canvase := range manifest.Sequences[0].Canvases {
for _, image := range canvase.Images {
//JPEG URL
canvases = append(canvases, image.Resource.Id)
w := fmt.Sprintf("/full/%d,/", image.Resource.Width)
imgUrl := strings.Replace(image.Resource.Id, "/full/full/", w, -1)
canvases = append(canvases, imgUrl)
}
}
return canvases, nil
Expand Down

0 comments on commit 64aa100

Please sign in to comment.