Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regex to extract the client version #525

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

hingston
Copy link

@hingston hingston commented May 14, 2024

Description

Updates the regex to work with the current client version.

Fixes #524

The original pattern r"window\.__twilightBuildID=\"([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12})\";" didn't match because it strictly expected an exact format, including specific UUID segments and a trailing semicolon. The adjusted pattern r'window\.__twilightBuildID\s*=\s*"([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})"' is more flexible, allowing for optional whitespace around the equal sign and matching any valid UUID.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I've ran it locally.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md)
  • My changes generate no new warnings
  • Any dependent changes have been updated in requirements.txt

@rdavydov rdavydov merged commit b4d3a93 into rdavydov:master Jun 15, 2024
@hingston hingston deleted the fix-client-version-regex branch August 17, 2024 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regex to extract the client version can't extract the current client version
2 participants