From 46476aba51e9e7af8bcbcc3a8971e1c2ecf24449 Mon Sep 17 00:00:00 2001 From: LockeShor <75901583+LockeShor@users.noreply.github.com> Date: Mon, 2 Mar 2026 16:50:24 -0500 Subject: [PATCH] remove excess info --- watcher.py | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/watcher.py b/watcher.py index aa1d9ef..f65c724 100644 --- a/watcher.py +++ b/watcher.py @@ -225,9 +225,6 @@ def truncate_text(value: str, limit: int) -> str: if len(text) <= limit: return text return f"{text[: max(0, limit - 1)].rstrip()}…" - - -def fetch_new_app_page_details(session: requests.Session, app_url: str) -> Dict[str, object]: response = session.get( app_url, timeout=REQUEST_TIMEOUT_SECONDS, @@ -323,35 +320,6 @@ def build_new_app_message(session: requests.Session, app: AppSnapshot) -> str: if app.summary: lines.append(f"Catalog summary: {truncate_text(app.summary, 700)}") - try: - details = fetch_new_app_page_details(session, app.url) - except requests.RequestException as exc: - logging.warning("Unable to fetch app details for %s: %s", app.url, exc) - details = {} - - page_title = str(details.get("page_title", "")) if details else "" - if page_title: - lines.append(f"Page title: {truncate_text(page_title, 180)}") - - description = str(details.get("description", "")) if details else "" - if description: - lines.append(f"Description: {truncate_text(description, 1000)}") - - detected_fields = details.get("detected_fields", []) if details else [] - if isinstance(detected_fields, list): - for field in detected_fields[:6]: - lines.append(str(field)) - - headings = details.get("headings", []) if details else [] - if isinstance(headings, list) and headings: - lines.append(f"Headings: {truncate_text(' | '.join(headings[:6]), 320)}") - - external_links = details.get("external_links", []) if details else [] - if isinstance(external_links, list) and external_links: - lines.append("External links:") - for link in external_links[:5]: - lines.append(f"- {truncate_text(str(link), 220)}") - message = "\n".join(lines) if len(message) <= MAX_MESSAGE_LEN: return message