diff --git a/main.go b/main.go index e7c4608..db46648 100644 --- a/main.go +++ b/main.go @@ -217,6 +217,8 @@ func crawl_dua(db *sql.DB) { fmt.Println("Visiting", r.URL) }) + bookCollector.Visit(currenturl) + // On the book page, extract the details bookCollector.OnHTML(`div.book-page`, func(e *colly.HTMLElement) { title := e.ChildText("h1") diff --git a/templates/books.html b/templates/books.html index 31fa75f..1662296 100644 --- a/templates/books.html +++ b/templates/books.html @@ -11,7 +11,7 @@ .book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px; } .book-card { background: #fff; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); overflow: hidden; text-align: center; transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; } .book-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.1); } - .book-card img { width: 100%; height: 300px; object-fit: cover; } + .book-card img { width: 100%; height: 400px; object-fit: cover; } .book-details { padding: 15px; } .book-details h2 { font-size: 1.2em; margin: 0 0 15px 0; min-height: 44px; } .checkbox-group { display: flex; justify-content: space-around; align-items: center; }