mirror of https://gitlab.com/bashrc2/epicyon
Check for none
parent
a193639b53
commit
1e5e38d8a8
|
@ -2041,10 +2041,11 @@ def html_common_emoji(base_dir: str, no_of_emoji: int) -> str:
|
|||
def text_mode_browser(ua_str: str) -> bool:
|
||||
"""Does the user agent indicate a text mode browser?
|
||||
"""
|
||||
text_mode_agents = ('Lynx/', 'w3m/', 'Links (', 'Emacs/', 'ELinks')
|
||||
for agent in text_mode_agents:
|
||||
if agent in ua_str:
|
||||
return True
|
||||
if ua_str:
|
||||
text_mode_agents = ('Lynx/', 'w3m/', 'Links (', 'Emacs/', 'ELinks')
|
||||
for agent in text_mode_agents:
|
||||
if agent in ua_str:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue