@@ -3,8 +3,8 @@ Python User Agents
3
3
4
4
` user_agents ` is a Python library that provides an easy way to identify/detect devices like mobile phones, tablets and their capabilities by parsing (browser/HTTP) user agent strings. The goal is to reliably detect whether:
5
5
6
- - User agent is a mobile, tablet or PC based device
7
- - User agent has touch capabilities (has touch screen)
6
+ * User agent is a mobile, tablet or PC based device
7
+ * User agent has touch capabilities (has touch screen)
8
8
9
9
` user_agents ` relies on the excellent [ ua-parser] ( https://github.com/ua-parser/uap-python ) to do the actual parsing of the raw user agent string.
10
10
@@ -57,11 +57,11 @@ str(user_agent) # returns "iPhone / iOS 5.1 / Mobile Safari 5.1"
57
57
58
58
Currently these attributes are supported:
59
59
60
- - ` is_mobile ` : whether user agent is identified as a mobile phone (iPhone, Android phones, Blackberry, Windows Phone devices etc)
61
- - ` is_tablet ` : whether user agent is identified as a tablet device (iPad, Kindle Fire, Nexus 7 etc)
62
- - ` is_pc ` : whether user agent is identified to be running a traditional "desktop" OS (Windows, OS X, Linux)
63
- - ` is_touch_capable ` : whether user agent has touch capabilities
64
- - ` is_bot ` : whether user agent is a search engine crawler/spider
60
+ * ` is_mobile ` : whether user agent is identified as a mobile phone (iPhone, Android phones, Blackberry, Windows Phone devices etc)
61
+ * ` is_tablet ` : whether user agent is identified as a tablet device (iPad, Kindle Fire, Nexus 7 etc)
62
+ * ` is_pc ` : whether user agent is identified to be running a traditional "desktop" OS (Windows, OS X, Linux)
63
+ * ` is_touch_capable ` : whether user agent has touch capabilities
64
+ * ` is_bot ` : whether user agent is a search engine crawler/spider
65
65
66
66
For example:
67
67
@@ -126,50 +126,54 @@ Running Tests
126
126
127
127
Changelog
128
128
---------
129
+ ### Version 2.2.0 (2020-08-23)
130
+ * ` ua-parser ` >= 0.10.0 is required. Thanks @jnozsc !
131
+ * Added ` get_device() ` , ` get_os() ` and ` get_browser() ` instance methods
132
+ to ` UserAgent ` . Thanks @rodrigondec !
129
133
130
134
### Version 2.1 (2020-02-08)
131
135
132
- - ` python-user-agents ` now require ` ua-parser>=0.9.0 ` . Thanks @jnozsc !
133
- - Properly detect Chrome Mobile browser families. Thanks @jnozsc !
136
+ * ` python-user-agents ` now require ` ua-parser>=0.9.0 ` . Thanks @jnozsc !
137
+ * Properly detect Chrome Mobile browser families. Thanks @jnozsc !
134
138
135
139
### Version 2.0 (2019-04-07)
136
140
137
- - ` python-user-agents ` now require ` ua-parser>=0.8.0 ` . Thanks @IMDagger !
141
+ * ` python-user-agents ` now require ` ua-parser>=0.8.0 ` . Thanks @IMDagger !
138
142
139
143
### Version 1.1
140
144
141
- - Fixes packaging issue
145
+ * Fixes packaging issue
142
146
143
147
### Version 1.0
144
148
145
- - Adds compatibility with ` ua-parser ` 0.4.0
146
- - Access to more device information in ` user_agent.device.brand ` and ` user_agent.device.model `
149
+ * Adds compatibility with ` ua-parser ` 0.4.0
150
+ * Access to more device information in ` user_agent.device.brand ` and ` user_agent.device.model `
147
151
148
152
### Version 0.3.2
149
153
150
- - Better mobile detection
151
- - Better PC detection
154
+ * Better mobile detection
155
+ * Better PC detection
152
156
153
157
### Version 0.3.1
154
158
155
- - user\_ agent.is\_ mobile returns True when mobile spider is detected
159
+ * user\_ agent.is\_ mobile returns True when mobile spider is detected
156
160
157
161
### Version 0.3.0
158
162
159
- - Added ** str** /** unicode** methods for convenience of pretty string
163
+ * Added ** str** /** unicode** methods for convenience of pretty string
160
164
161
165
### Version 0.2.0
162
166
163
- - Fixed errors when running against newer versions if ua-parser
164
- - Support for Python 3
167
+ * Fixed errors when running against newer versions if ua-parser
168
+ * Support for Python 3
165
169
166
170
### Version 0.1.1
167
171
168
- - Added ` is_bot ` property
169
- - Symbian OS devices are now detected as a mobile device
172
+ * Added ` is_bot ` property
173
+ * Symbian OS devices are now detected as a mobile device
170
174
171
175
### Version 0.1
172
176
173
- - Initial release
177
+ * Initial release
174
178
175
179
Developed by the cool guys at [ Stamps] ( http://stamps.co.id ) .
0 commit comments