MCPcopy Create free account
hub / github.com/HiddenCodeDevs/BlumTelegramBot / get_user_agents

Function get_user_agents

bot/core/agents.py:210–223  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

208 return None
209
210def get_user_agents():
211 try:
212 with open(USER_AGENTS_FILE_NAME, 'r') as user_agents:
213 session_data = json.load(user_agents)
214 if isinstance(session_data, list):
215 return session_data
216
217 except FileNotFoundError:
218 logger.warning("User agents file not found, creating...")
219
220 except json.JSONDecodeError:
221 logger.warning("User agents file is empty or corrupted.")
222
223 return []
224
225def save_user_agent(session_name):
226 session_ug_dict = get_user_agents()

Callers 2

save_user_agentFunction · 0.85
check_user_agentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected