#!/usr/bin/env python3 import re import os import logging import subprocess import requests # Configure logging logging.basicConfig( format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S') def get_commit(version_url): """Fetches the git hash from the Chromium ffmpeg submodule URL using requests. Args: version_url: The URL of the Chromium ffmpeg submodule for a specific version. Returns: The git commit hash found in the submodule URL, or None if not found. """ try: # Use requests.get to fetch the URL content response = requests.get(version_url) response.raise_for_status() # Raise exception for non-200 status codes # Search for commit hash within the 'gitlink-detail' class (adapt if needed) match = re.search( r'