-
-
Save montylounge/297641 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This code grabs all unknown browsers in django-request on a django project. | |
| from request.models import Request | |
| from request.utils import browsers | |
| requests = Request.objects.this_month().only('user_agent') | |
| user_agents = [request.user_agent for request in requests] | |
| unknown_agents = [agent for agent in user_agents if browsers.resolve(agent)[0] == 'Unknown'] | |
| print unknown_agents |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment