Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Commit 819c546

Browse files
fixed crash because of files amount not displayed
1 parent 6ef02e8 commit 819c546

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

specificScrapers/coomer.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ func (t T) Coomer() []variables.Item {
4848
c := colly.NewCollector()
4949

5050
c.OnHTML("#paginator-bottom", func(h *colly.HTMLElement) {
51-
item.Metadata = map[string]string{
52-
"files": strings.Split(h.ChildText("small"), "of ")[1] + " files",
51+
if h.ChildText("small") != "" {
52+
item.Metadata = map[string]string{
53+
"files": strings.Split(h.ChildText("small"), "of ")[1] + " files",
54+
}
5355
}
5456
})
5557

0 commit comments

Comments
 (0)