mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-03 10:00:10 +00:00
refactor: streamline proxy checking in search function (#326)
This commit is contained in:
parent
4f0c58f14d
commit
c01945fdbc
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user