Skip to content

Commit c01945f

Browse files
refactor: streamline proxy checking in search function (#326)
1 parent 4f0c58f commit c01945f

File tree

1 file changed

+5
-3
lines changed
  • StreamingCommunity/Api/Site/streamingcommunity

1 file changed

+5
-3
lines changed

StreamingCommunity/Api/Site/streamingcommunity/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,16 @@ def search(string_to_search: str = None, get_onlyDatabase: bool = False, direct_
121121
if site_constant.TELEGRAM_BOT:
122122
bot = get_bot_instance()
123123

124+
# Check proxy if not already set
125+
finder = ProxyFinder(site_constant.FULL_URL)
126+
proxy = finder.find_fast_proxy()
127+
124128
if direct_item:
125129
select_title_obj = MediaItem(**direct_item)
126130
process_search_result(select_title_obj, selections, proxy)
127131
return
128132

129-
# Check proxy if not already set
130-
finder = ProxyFinder(site_constant.FULL_URL)
131-
proxy = finder.find_fast_proxy()
133+
132134

133135
actual_search_query = get_user_input(string_to_search)
134136

0 commit comments

Comments
 (0)