Less Mastodon-specific user agent

main
Bob Mottram 2022-01-31 16:08:06 +00:00
parent 2c4b0a4433
commit 7bb310e811
1 changed files with 2 additions and 2 deletions

View File

@ -2891,9 +2891,9 @@ def user_agent_domain(user_agent: str, debug: bool) -> str:
"""If the User-Agent string contains a domain
then return it
"""
if '+http' not in user_agent:
if 'http' not in user_agent:
return None
agent_domain = user_agent.split('+http')[1].strip()
agent_domain = user_agent.split('http')[1].strip()
if '://' in agent_domain:
agent_domain = agent_domain.split('://')[1]
if '/' in agent_domain: