From 8fc83f6a54e8ac811d12dd9b4ddb3f9419ebf314 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Sat, 2 Dec 2023 21:51:30 -0500 Subject: fix build number fetch again :DDD --- src/startup.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/startup.cpp') diff --git a/src/startup.cpp b/src/startup.cpp index 1bfd9a4..b6d09a3 100644 --- a/src/startup.cpp +++ b/src/startup.cpp @@ -29,7 +29,7 @@ std::optional> ParseCookie(const Glib::ustri } std::optional GetJavascriptFileFromAppPage(const Glib::ustring &contents) { - auto regex = Glib::Regex::create(R"(/assets/\w{20}.js)"); + auto regex = Glib::Regex::create(R"(/assets/\w+\.?\w{20}\.js)"); std::vector matches; // regex->match_all doesnt work for some reason @@ -43,8 +43,8 @@ std::optional GetJavascriptFileFromAppPage(const Glib::ustring &c start_position += str.size(); } - if (matches.size() >= 2) { - return matches[matches.size() - 2]; + if (matches.size() >= 10) { + return matches[matches.size() - 10]; } return {}; -- cgit v1.2.3