From cd8ed8bc5793985df2c1692072a932ceee517b95 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 8 Jul 2026 02:13:35 +0200 Subject: OPEN THE RUST GATES Signed-off-by: salmonik --- cogs/utils/url_helper.py | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 cogs/utils/url_helper.py (limited to 'cogs/utils/url_helper.py') diff --git a/cogs/utils/url_helper.py b/cogs/utils/url_helper.py deleted file mode 100644 index eac06f1..0000000 --- a/cogs/utils/url_helper.py +++ /dev/null @@ -1,21 +0,0 @@ -# This file is part of Senator Sperma -# Licensed under the GPL-3.0 License -# Copyright (C) 2026 Salmonik @ salmonik@tuta.io -# https://codeberg.org/salmonik/senator-sperma - - -def clean_url_for_ytdlp(url: str) -> str: - """Clean URL by removing everything after the first '&'. - - This prevents yt-dlp from interpreting additional query parameters - (like &list=...) as playlist URLs. - - Example: - Input: https://www.youtube.com/watch?v=lPGipwoJiOM&list=RDlPGipwoJiOM& - Output: https://www.youtube.com/watch?v=lPGipwoJiOM - """ - # Find the first '&' and truncate - first_ampersand = url.find('&') - if first_ampersand != -1: - return url[:first_ampersand] - return url -- cgit v1.2.3