Update user-agent (#283)

Update user-agent to the latest Firefox ESR.
This commit is contained in:
Marc Wrobel
2024-01-24 22:58:56 +01:00
committed by GitHub
parent a8bc46732a
commit d72008ae9c
3 changed files with 4 additions and 4 deletions

View File

@@ -7,9 +7,6 @@ from pathlib import Path
import frontmatter
from liquid import Template
# Do not update the format: it's also used to declare groups in the GitHub Actions logs.
logging.basicConfig(format="%(message)s", level=logging.INFO)
# Handle versions having at least 2 digits (ex. 1.2) and at most 4 digits (ex. 1.2.3.4), with an optional leading "v".
# Major version must be >= 1.
DEFAULT_VERSION_REGEX = r"^v?(?P<major>[1-9]\d*)\.(?P<minor>\d+)(\.(?P<patch>\d+)(\.(?P<tiny>\d+))?)?$"

View File

@@ -8,7 +8,7 @@ from requests_futures.sessions import FuturesSession
from urllib3.util import Retry
# See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent.
USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0'
USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0'
def fetch_urls(urls: list[str], data: any = None, headers: dict[str, str] = None,

View File

@@ -4,6 +4,9 @@ import os
from datetime import datetime, timezone
from pathlib import Path
# Do not update the format: it's also used to declare groups in the GitHub Actions logs.
logging.basicConfig(format="%(message)s", level=logging.INFO)
VERSIONS_PATH = Path(os.environ.get("VERSIONS_PATH", "releases"))