mirror of
https://github.com/harry0703/MoneyPrinterTurbo.git
synced 2026-02-23 01:17:21 +08:00
optimize pexels_api_keys config
This commit is contained in:
parent
7fb1a95a82
commit
a5f208f951
@ -17,6 +17,10 @@ if not pexels_api_keys:
|
||||
|
||||
|
||||
def round_robin_api_key():
|
||||
# if only one key is provided, return it
|
||||
if isinstance(pexels_api_keys, str):
|
||||
return pexels_api_keys
|
||||
|
||||
global requested_count
|
||||
requested_count += 1
|
||||
return pexels_api_keys[requested_count % len(pexels_api_keys)]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user