INNER CODE UNIT · Python
accept_language
cwuom/NeriPlayer · tools_pub/ytmusic_api_probe.py:461
def accept_language(hl: str, gl: str) -> str:
return f"{hl},{gl.lower()};q=0.9,en;q=0.8"
def utc_offset_minutes() -> int:
return -time.timezone // 60
def current_timezone_name() -> str:
if time.daylight and time.localtime().tm_isdst:
return time.tzname[1] or "UTC"
return time.tzname[0] or "UTC"
def find_optional(text: str, *patterns: str) -> str:
for pattern in patterns:
match = re.search(pattern, text)
if match: