user agent regex updated in mobile platform

learner-3838
This commit is contained in:
adeelehsan
2019-09-05 15:10:53 +05:00
parent 2c1fc22af9
commit 808f1ad156

View File

@@ -56,7 +56,7 @@ class MobilePlatform(six.with_metaclass(abc.ABCMeta)):
class IOS(MobilePlatform):
""" iOS platform """
USER_AGENT_REGEX = (r'\((?P<version>[0-9]+.[0-9]+.[0-9]+(.[0-9a-zA-Z]*)?); OS Version [0-9.]+ '
USER_AGENT_REGEX = (r'\((?P<version>[0-9]+.[0-9]+.[0-9]+(\.[0-9a-zA-Z]*)?); OS Version [0-9.]+ '
r'\(Build [0-9a-zA-Z]*\)\)')
NAME = "iOS"
@@ -64,7 +64,7 @@ class IOS(MobilePlatform):
class Android(MobilePlatform):
""" Android platform """
USER_AGENT_REGEX = (r'Dalvik/[.0-9]+ \(Linux; U; Android [.0-9]+; (.*) Build/[0-9a-zA-Z]*\) '
r'(.*)/(?P<version>[0-9]+.[0-9]+.[0-9]+(.[0-9a-zA-Z]*)?)')
r'(.*)/(?P<version>[0-9]+.[0-9]+.[0-9]+(\.[0-9a-zA-Z]*)?)')
NAME = "Android"