Open GoogleCodeExporter opened 9 years ago
you can check if browser is a mobile browser :
using the following lib : from ua_parser import user_agent_parser
and if you build an if else statement around result['device'] ismobile = True
and
def __init__(self, server_address, HandlerClass, cmd=None, env_term=None,
ssl_enabled=True, ssl_cert=None, www_dir='www'):
else
def __init__(self, server_address, HandlerClass, cmd=None, env_term=None,
ssl_enabled=True, ssl_cert=None, www_dir='mobilewww'):
by the way :
print result_dict['device']
# {'is_spider': False, 'is_mobile': True, 'family': 'iPhone'}
Original comment by rabi...@gmail.com
on 26 Jul 2012 at 1:46
Original issue reported on code.google.com by
sdm...@gmail.com
on 28 Oct 2008 at 2:06