From c01945fdbcb4d5a7776c6d33f50902699332e923 Mon Sep 17 00:00:00 2001 From: Alessandro Perazzetta <482310+AlessandroPerazzetta@users.noreply.github.com> Date: Thu, 22 May 2025 08:36:44 +0200 Subject: [PATCH] refactor: streamline proxy checking in search function (#326) --- .../Api/Site/streamingcommunity/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/StreamingCommunity/Api/Site/streamingcommunity/__init__.py b/StreamingCommunity/Api/Site/streamingcommunity/__init__.py index a1b98d0..bff8654 100644 --- a/StreamingCommunity/Api/Site/streamingcommunity/__init__.py +++ b/StreamingCommunity/Api/Site/streamingcommunity/__init__.py @@ -121,14 +121,16 @@ def search(string_to_search: str = None, get_onlyDatabase: bool = False, direct_ if site_constant.TELEGRAM_BOT: bot = get_bot_instance() + # Check proxy if not already set + finder = ProxyFinder(site_constant.FULL_URL) + proxy = finder.find_fast_proxy() + if direct_item: select_title_obj = MediaItem(**direct_item) process_search_result(select_title_obj, selections, proxy) return - # Check proxy if not already set - finder = ProxyFinder(site_constant.FULL_URL) - proxy = finder.find_fast_proxy() + actual_search_query = get_user_input(string_to_search)