mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-07 12:05:35 +00:00
Fix tmp file user agent for linux and mac
This commit is contained in:
parent
bf7153214f
commit
f9b92d076d
@ -6,6 +6,7 @@ import os
|
||||
import random
|
||||
import threading
|
||||
import json
|
||||
import tempfile
|
||||
from typing import Dict, List
|
||||
|
||||
# Internal utilities
|
||||
@ -80,7 +81,7 @@ class UserAgentManager:
|
||||
def __init__(self):
|
||||
|
||||
# Get path to temp file where save all user agents
|
||||
self.user_agent_file = os.path.join(os.environ.get('TEMP'), 'fake_user_agent.json')
|
||||
self.user_agent_file = os.path.join(tempfile.gettempdir(), 'fake_user_agent.json')
|
||||
|
||||
# If file dont exist, creaet it
|
||||
if not os.path.exists(self.user_agent_file):
|
||||
|
Loading…
x
Reference in New Issue
Block a user