bug: #16 Error handling for cases where no URL is provided for the page to download.

This commit is contained in:
Barold 2021-04-07 07:37:52 +02:00
parent abaf731d7e
commit cf16f9956a
3 changed files with 5 additions and 0 deletions

View File

@ -113,6 +113,11 @@ func main() {
var filenames []string var filenames []string
for i := 0; i < len(pages.Data); i++ { for i := 0; i < len(pages.Data); i++ {
if len(pages.Data[i].Source) == 0 {
fmt.Println("No Download URL for page ", i)
continue
}
fmt.Println("Source ", pages.Data[i].Source) fmt.Println("Source ", pages.Data[i].Source)
fmt.Println("ID: ", pages.Data[i].Index) fmt.Println("ID: ", pages.Data[i].Index)

Binary file not shown.

Binary file not shown.