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

Closed
opened 2026-03-15 01:40:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ArchiveBox/ArchiveBox/pull/1199
Author: @overhacked
Created: 7/31/2023
Status: Merged
Merged: 8/1/2023
Merged by: @pirate

Base: devHead: chrome_version_detection_fix


📝 Commits (1)

  • d0e65eb More reliably detect Google Chrome version number

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 archivebox/util.py (+2 -1)

📄 Description

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ArchiveBox/ArchiveBox/pull/1199 **Author:** [@overhacked](https://github.com/overhacked) **Created:** 7/31/2023 **Status:** ✅ Merged **Merged:** 8/1/2023 **Merged by:** [@pirate](https://github.com/pirate) **Base:** `dev` ← **Head:** `chrome_version_detection_fix` --- ### 📝 Commits (1) - [`d0e65eb`](https://github.com/ArchiveBox/ArchiveBox/commit/d0e65eba7f99a91665c9a0e0e290cdb55e58e416) More reliably detect Google Chrome version number ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `archivebox/util.py` (+2 -1) </details> ### 📄 Description <!-- 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 01:40:24 +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#4360
No description provided.