Skip to content

Commit

Permalink
chore: add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jaypyles committed Dec 3, 2024
1 parent 8b5fba0 commit 16f2368
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/chrome_ext_thon/google_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,21 @@ def search(
description_box = result.find("div", {"style": "-webkit-line-clamp:2"})
favicon_tag = result.find("img")
favicon = favicon_tag["src"] if favicon_tag else None

if description_box:
LOG.info(f"Found description: {description_box.text}")

description = description_box.text
if link and title and description:
start += 1
if advanced:
yield SearchResult(
link["href"], title.text, description, favicon
)
else:
yield link["href"]

start += 1
else:
start += 1
LOG.info("No description found")

sleep(sleep_interval)

0 comments on commit 16f2368

Please sign in to comment.