mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-05 02:55:25 +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:
|
if site_constant.TELEGRAM_BOT:
|
||||||
bot = get_bot_instance()
|
bot = get_bot_instance()
|
||||||
|
|
||||||
|
# Check proxy if not already set
|
||||||
|
finder = ProxyFinder(site_constant.FULL_URL)
|
||||||
|
proxy = finder.find_fast_proxy()
|
||||||
|
|
||||||
if direct_item:
|
if direct_item:
|
||||||
select_title_obj = MediaItem(**direct_item)
|
select_title_obj = MediaItem(**direct_item)
|
||||||
process_search_result(select_title_obj, selections, proxy)
|
process_search_result(select_title_obj, selections, proxy)
|
||||||
return
|
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)
|
actual_search_query = get_user_input(string_to_search)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user