Closed ye4241 closed 10 months ago
yep this fixes it for me
This worked for me 😄😄 many thanks mate ♥️
Better fix, but...
build_find = re.match(r'.*Build Number:\D+(\d+).*', build_file)
return int(build_find.group(1)) if build_find else 243588
...would be even better. 👍
@paulofreitas I have updated to use regex to find build number and detect all exceptions (maybe).
@paulofreitas I have updated to use regex to find build number and detect all exceptions (maybe).
@ye4241 It's much better now, but do note that the quotes in the regex are not needed, nor the call to str.is_numeric()
. The \D+
in the regex will skip anything between the colon :
and the first number, and the (\d+)
part will only match the numbers up to the next non-number. So the regex alone will do a perfect match and will only return if it does actually match anything - if it doesn't work it means they changed the code again. 👍
@paulofreitas Indeed, I have remove the useless detect for number, and add the default build number.
i did some experiments with the solution you provided, it works in single token code (always)
But in multiple token code it gives clientOSexecption error (sometimes)
While a very little times, it works like nothing happened, it works perfectly fine (tested in 8 token code) (rarely works)
help
Thanks for the PR! I'll merge this now to solve the issue at hand, but I'll rework this fallback code later on and add tests to be a little more resilient. Looks like I've neglected it a little bit after I offloaded things to a separate API.
The API should be back within a week or so. I've been very busy recently and haven't had time to deal with some hosting issues.
Summary
Fix _get_build_number find error with new string
'Build Number: ").concat("'
, issue #597General Info
In latest discord website, the build number finding has been updated.