diff options
| author | Aldo Cortesi <aldo@corte.si> | 2016-10-20 12:36:26 +1300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-20 12:36:26 +1300 |
| commit | 711078ba3f63257df745bb3edd80a85717e94b20 (patch) | |
| tree | d3116cd540faf01f272a0892fc6a9b83b4f6de8a /netlib/http/user_agents.py | |
| parent | ee56d3fae0baeef1f31a83db122dd832d4c0e07e (diff) | |
| parent | 8430f857b504a3e7406dc36e54dc32783569d0dd (diff) | |
| download | mitmproxy-711078ba3f63257df745bb3edd80a85717e94b20.tar.gz mitmproxy-711078ba3f63257df745bb3edd80a85717e94b20.tar.bz2 mitmproxy-711078ba3f63257df745bb3edd80a85717e94b20.zip | |
Merge pull request #1637 from cortesi/tatanetlib
This PR merges netlib into mitmproxy
Diffstat (limited to 'netlib/http/user_agents.py')
| -rw-r--r-- | netlib/http/user_agents.py | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/netlib/http/user_agents.py b/netlib/http/user_agents.py deleted file mode 100644 index d0ca2f21..00000000 --- a/netlib/http/user_agents.py +++ /dev/null @@ -1,50 +0,0 @@ -""" - A small collection of useful user-agent header strings. These should be - kept reasonably current to reflect common usage. -""" - -# pylint: line-too-long - -# A collection of (name, shortcut, string) tuples. - -UASTRINGS = [ - ("android", - "a", - "Mozilla/5.0 (Linux; U; Android 4.1.1; en-gb; Nexus 7 Build/JRO03D) AFL/01.04.02"), # noqa - ("blackberry", - "l", - "Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.346 Mobile Safari/534.11+"), # noqa - ("bingbot", - "b", - "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"), # noqa - ("chrome", - "c", - "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1"), # noqa - ("firefox", - "f", - "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:14.0) Gecko/20120405 Firefox/14.0a1"), # noqa - ("googlebot", - "g", - "Googlebot/2.1 (+http://www.googlebot.com/bot.html)"), # noqa - ("ie9", - "i", - "Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US)"), # noqa - ("ipad", - "p", - "Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3"), # noqa - ("iphone", - "h", - "Mozilla/5.0 (iPhone; CPU iPhone OS 4_2_1 like Mac OS X) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148a Safari/6533.18.5"), # noqa - ("safari", - "s", - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10"), # noqa -] - - -def get_by_shortcut(s): - """ - Retrieve a user agent entry by shortcut. - """ - for i in UASTRINGS: - if s == i[1]: - return i |
