mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-30 11:38:36 -07:00
Log PlexPy logins to database
This commit is contained in:
parent
27716d080f
commit
8ed7688277
8 changed files with 1018 additions and 7 deletions
29
lib/httpagentparser/more.py
Normal file
29
lib/httpagentparser/more.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
import httpagentparser as hap
|
||||
|
||||
class JakartaHTTPClinet(hap.Browser):
|
||||
name = 'Jakarta Commons-HttpClient'
|
||||
look_for = name
|
||||
version_splitters = ['/']
|
||||
|
||||
class PythonRequests(hap.Browser):
|
||||
name = 'Python Requests'
|
||||
look_for = 'python-requests'
|
||||
|
||||
# Registering new UAs
|
||||
|
||||
hap.detectorshub.register(JakartaHTTPClinet())
|
||||
hap.detectorshub.register(PythonRequests())
|
||||
|
||||
# Tests
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
s = 'Jakarta Commons-HttpClient/3.1'
|
||||
|
||||
print(hap.detect(s))
|
||||
print(hap.simple_detect(s))
|
||||
|
||||
s = 'python-requests/1.2.3 CPython/2.7.4 Linux/3.8.0-29-generic'
|
||||
|
||||
print(hap.detect(s))
|
||||
print(hap.simple_detect(s))
|
Loading…
Add table
Add a link
Reference in a new issue