From f9602f5e99b54cd0be6c6eddca3b6d54bc3251e2 Mon Sep 17 00:00:00 2001 From: MacDue Date: Tue, 9 May 2023 08:01:45 +0100 Subject: [PATCH] Update UA for Ladybird Browser (previously SerenityOS Browser) --- regexes.yaml | 9 ++++----- tests/test_os.yaml | 2 +- tests/test_ua.yaml | 8 ++++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/regexes.yaml b/regexes.yaml index 5f1119ac..57c52dd7 100644 --- a/regexes.yaml +++ b/regexes.yaml @@ -1013,10 +1013,10 @@ user_agent_parsers: # HTTrack crawler - regex: '\b(HTTrack) (\d+)\.(\d+)(?:[\.\-](\d+)|)' - # SerenityOS (https://serenityos.org) - # https://github.com/SerenityOS/serenity/blob/2e1bbcb0faeae92d7595b8e0b022a8cdcecca07e/Userland/Libraries/LibWeb/Loader/ResourceLoader.h#L27 - - regex: 'SerenityOS' - family_replacement: 'SerenityOS Browser' + # Ladybird Browser (https://ladybird.dev) + # https://github.com/SerenityOS/serenity/blob/8da9ff24e4e720b1e80a027f09c419ac9503f896/Userland/Libraries/LibWeb/Loader/ResourceLoader.h#L52 + # Note: The browser is just called "Browser" inside SerenityOS, and Ladybird everywhere else. + - regex: 'LibWeb\+LibJS\/\d+\.\d+ (Ladybird)\/(\d+)\.(\d+)' os_parsers: ########## @@ -5549,7 +5549,6 @@ device_parsers: device_replacement: 'Motorola$2' brand_replacement: 'Motorola' model_replacement: '$2' - ########## # nintendo diff --git a/tests/test_os.yaml b/tests/test_os.yaml index 0e71e611..c8590400 100644 --- a/tests/test_os.yaml +++ b/tests/test_os.yaml @@ -3175,7 +3175,7 @@ test_cases: patch: patch_minor: - - user_agent_string: 'Mozilla/4.0 (SerenityOS; x86_64) LibWeb+LibJS (Not KHTML, nor Gecko) LibWeb' + - user_agent_string: 'Mozilla/5.0 (SerenityOS; x86_64) LibWeb+LibJS/1.0 Ladybird/1.0' family: 'SerenityOS' major: minor: diff --git a/tests/test_ua.yaml b/tests/test_ua.yaml index eccafee9..791e1b9a 100644 --- a/tests/test_ua.yaml +++ b/tests/test_ua.yaml @@ -8646,10 +8646,10 @@ test_cases: minor: '20' patch: '1' - - user_agent_string: 'Mozilla/4.0 (SerenityOS; x86_64) LibWeb+LibJS (Not KHTML, nor Gecko) LibWeb' - family: 'SerenityOS Browser' - major: - minor: + - user_agent_string: 'Mozilla/5.0 (Linux; x86_64) LibWeb+LibJS/1.0 Ladybird/1.0' + family: 'Ladybird' + major: '1' + minor: '0' patch: - user_agent_string: 'surveyon/2.7.6 Mobile (Android: 11; MODEL:CPH2127; PRODUCT:CPH2127T2; MANUFACTURER:OPPO;)'