Skip to content

Commit

Permalink
[extractor:hitomi] update json parsing allow gallery.ID to be string …
Browse files Browse the repository at this point in the history
…or int
  • Loading branch information
gan-of-culture committed Aug 24, 2023
1 parent f17f1de commit f1a4409
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions extractors/hitomi/hitomi.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ type tag struct {
}

type gallery struct {
Date string `json:"date"`
Files []img `json:"files"`
JapaneseTitle string `json:"japanese_title"`
Type string `json:"type"`
ID string `json:"id"`
Tags []tag `json:"tags"`
LanguageLocalName string `json:"language_localname"`
Language string `json:"language"`
Title string `json:"title"`
Date string `json:"date"`
Files []img `json:"files"`
JapaneseTitle string `json:"japanese_title"`
Type string `json:"type"`
ID json.RawMessage `json:"id"`
Tags []tag `json:"tags"`
LanguageLocalName string `json:"language_localname"`
Language string `json:"language"`
Title string `json:"title"`
}

const site = "https://hitomi.la/"
Expand Down Expand Up @@ -175,7 +175,7 @@ func extractData(URL string) (*static.Data, error) {
URLs: URLs,
},
},
URL: fmt.Sprintf("%s%s.html", readerURL, galleryData.ID),
URL: fmt.Sprintf("%s%s.html", readerURL, string(galleryData.ID)),
}, nil
}

Expand Down

0 comments on commit f1a4409

Please sign in to comment.