Skip to content

Commit

Permalink
fix: broken parsing for wishlist pages
Browse files Browse the repository at this point in the history
This doesn't really fix the issue anyway, because Geizhals does some serverside rendering or some clientside javascript stuff.
  • Loading branch information
d-Rickyy-b committed Jan 1, 2024
1 parent 9d922d8 commit eb07bc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/geizhals/parsing.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ func parseEntity(ghURL EntityURL, doc *goquery.Document) (Entity, error) {
// parseWishlist parses the geizhals wishlist page and returns an Entity struct.
func parseWishlist(doc *goquery.Document) (string, Price, error) {
// Parse name from html
name := doc.Find("div.wishlist h1.wishlist__headline > span").Text()
name := doc.Find("div.wishlist-header h1 > a").Text()
name = strings.TrimSpace(name)

// Parse price from html
priceString := doc.Find("div.wishlist_sum_area span.gh_price span.gh_price > span.gh_price").Text()
priceString := doc.Find(".wishlist-bottom span.wishlist-sum:nth-child(2)").Text()

price, parseErr := parsePrice(priceString)
if parseErr != nil {
Expand Down

0 comments on commit eb07bc1

Please sign in to comment.