From dba3388567818cb5c60be9d406d3e1cccc84b3ea Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 29 Apr 2026 14:22:03 +0200 Subject: Refactor database connections and add integration tests - Use context managers for sqlite3 connections in cron, vclogs, and database utils - Add URL helper utility for yt-dlp with clean_url_for_ytdlp function - Add slow integration test markers and new integration test files - Fix test imports to use conftest directly instead of tests.conftest - Improve downloader error handling and use COPYPARTY_URL_UPLOAD env var - Update pytest.ini with slow test markers and warning filters - Document slow test usage in AGENTS.md --- cogs/web.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cogs/web.py') diff --git a/cogs/web.py b/cogs/web.py index eea13b1..fd22f9f 100644 --- a/cogs/web.py +++ b/cogs/web.py @@ -11,6 +11,7 @@ from bs4 import BeautifulSoup import urllib.parse import yt_dlp import logging +from cogs.utils.url_helper import clean_url_for_ytdlp logger = logging.getLogger(__name__) @@ -24,6 +25,7 @@ class Web(commands.Cog): if "youtube.com/watch" not in url: return None + url = clean_url_for_ytdlp(url) logger.info("youtube link") try: ydl_opts = {"quiet": True, "nowarnings": True} -- cgit v1.2.3