
Security News
Opengrep Adds Apex Support and New Rule Controls in Latest Updates
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
A comprehensive tool to detect web browser versions across different operating systems
A comprehensive Python package to programmatically detect web browser versions across different operating systems. This tool provides native OS detection without requiring Selenium or WebDrivers, making it perfect for automation scripts, system administration, and CI/CD pipelines.
Browser | Windows | macOS | Linux | Notes |
---|---|---|---|---|
Google Chrome | ā | ā | ā | Includes Chromium |
Mozilla Firefox | ā | ā | ā | Includes Firefox ESR |
Microsoft Edge | ā | ā | ā | Includes Beta/Dev/Enterprise |
Internet Explorer | ā | ā | ā | Windows only, deprecated |
pip install browser-versions
git clone https://github.com/pandiyarajk/browser-versions.git
cd browser-versions
pip install -e .
# Detect all browsers
browser-versions
# Detect specific browser
browser-versions --browser chrome
# Get version only (for scripting)
browser-versions --browser firefox --version-only
# Check script version
browser-versions --script-version
# Enable verbose logging
browser-versions --browser all --verbose
from browser_versions import BrowserVersionDetector
# Create detector instance
detector = BrowserVersionDetector()
# Detect specific browser
chrome_version = detector.detect_chrome_version()
print(f"Chrome version: {chrome_version}")
# Detect all browsers
all_browsers = detector.detect_all_browsers()
for browser, info in all_browsers.items():
if browser != 'platform':
status = info['version'] if info['detected'] else 'Not found'
print(f"{browser}: {status}")
from browser_versions import (
get_chrome_version,
get_firefox_version,
get_edge_version,
get_ie_version,
get_all_browser_versions
)
# Quick version checks
chrome_ver = get_chrome_version()
firefox_ver = get_firefox_version()
edge_ver = get_edge_version()
ie_ver = get_ie_version()
# Get all versions at once
all_versions = get_all_browser_versions()
Browser Version Detection Results:
========================================
ā Chrome: 120.0.6099.109
ā Firefox: 120.0
ā Edge: Not found
ā Ie: Not found
Platform: win32
chrome: 120.0.6099.109
firefox: 120.0
edge: Not found
ie: Not found
The main class for browser version detection.
detect_chrome_version()
ā Optional[str]
detect_firefox_version()
ā Optional[str]
detect_edge_version()
ā Optional[str]
detect_ie_version()
ā Optional[str]
detect_all_browsers()
ā Dict[str, Any]
detector = BrowserVersionDetector()
# Individual browser detection
chrome_ver = detector.detect_chrome_version()
if chrome_ver:
print(f"Chrome {chrome_ver} detected")
else:
print("Chrome not found")
# All browsers detection
results = detector.detect_all_browsers()
print(f"Platform: {results['platform']}")
for browser, info in results.items():
if browser != 'platform':
print(f"{browser}: {info['version'] if info['detected'] else 'Not found'}")
get_chrome_version()
ā Optional[str]
get_firefox_version()
ā Optional[str]
get_edge_version()
ā Optional[str]
get_ie_version()
ā Optional[str]
get_all_browser_versions()
ā Dict[str, Any]
# Check browser versions across multiple systems
from browser_versions import get_all_browser_versions
def check_system_browsers():
browsers = get_all_browser_versions()
detected = [b for b, info in browsers.items()
if b != 'platform' and info['detected']]
return detected
# Check if required browser is available
if browser-versions --browser chrome --version-only | grep -q "Not found"; then
echo "Chrome not found, installing..."
# Install Chrome
fi
# Ensure compatible browser versions
from browser_versions import get_chrome_version
def check_chrome_compatibility():
version = get_chrome_version()
if not version:
raise RuntimeError("Chrome not installed")
major_version = int(version.split('.')[0])
if major_version < 90:
raise RuntimeError(f"Chrome version {version} is too old. Need 90+")
return version
git clone https://github.com/pandiyarajk/browser-versions.git
cd browser-versions
pip install -e ".[dev]"
pytest
black browser_versions.py
flake8 browser_versions.py
mypy browser_versions.py
python -m build
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
Pandiyaraj Karuppasamy - pandiyarajk@live.com
See CHANGELOG.md for a detailed history of changes.
Note: Internet Explorer has been deprecated by Microsoft and may not be available on newer Windows versions. This tool includes IE detection for legacy system support.
FAQs
A comprehensive tool to detect web browser versions across different operating systems
We found that browser-versions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Ā It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.