[PR #1199] More reliably detect Google Chrome major version number #2858

Closed
opened 2026-03-01 18:00:57 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/ArchiveBox/ArchiveBox/pull/1199

State: closed
Merged: Yes


Summary

Previous method was splitting on the first whitespace, and missing the version number when it appeared as "Google Chrome 115.0.234.2342" instead of, i.e. "Chromium 115.0.234.8283".

This commit changes the version detection to regex search for whitespace, then one or more digits followed by a period, then at least one more digit. Only the first sequence of digits is captured. Unless Chrome radically changes their version numbering, this should capture the first group of digits after the reported browser name, which would be the major version.

Related issues

None

Changes these areas

  • Bugfixes
  • Feature behavior
  • Command line interface
  • Configuration options
  • Internal architecture
  • Snapshot data layout on disk
**Original Pull Request:** https://github.com/ArchiveBox/ArchiveBox/pull/1199 **State:** closed **Merged:** Yes --- <!-- IMPORTANT: Do not submit PRs with only formatting / PEP8 / line length changes. --> # Summary Previous method was splitting on the first whitespace, and missing the version number when it appeared as `"Google Chrome 115.0.234.2342"` instead of, i.e. `"Chromium 115.0.234.8283"`. This commit changes the version detection to regex search for whitespace, then one or more digits followed by a period, then at least one more digit. Only the first sequence of digits is captured. Unless Chrome radically changes their version numbering, this should capture the first group of digits after the reported browser name, which would be the major version. <!--e.g. This PR fixes ABC or adds the ability to do XYZ...--> # Related issues *None* <!-- e.g. #123 or Roadmap goal # https://github.com/pirate/ArchiveBox/wiki/Roadmap --> # Changes these areas - [x] Bugfixes - [ ] Feature behavior - [ ] Command line interface - [ ] Configuration options - [ ] Internal architecture - [ ] Snapshot data layout on disk
kerem 2026-03-01 18:00:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#2858
No description provided.