diff --git a/src/startup.cpp b/src/startup.cpp index 130ba9b..1bfd9a4 100644 --- a/src/startup.cpp +++ b/src/startup.cpp @@ -43,8 +43,8 @@ std::optional GetJavascriptFileFromAppPage(const Glib::ustring &c start_position += str.size(); } - if (matches.size() >= 7) { - return matches[matches.size() - 7]; + if (matches.size() >= 2) { + return matches[matches.size() - 2]; } return {}; @@ -64,7 +64,7 @@ std::optional GetBuildNumberFromJSURL(const Glib::ustring &url, const auto res = req.execute(); if (res.error) return {}; - auto regex = Glib::Regex::create("buildNumber:\"(\\d+)\""); + auto regex = Glib::Regex::create(R"(Build Number: "\).concat\("(\d+))"); Glib::MatchInfo match; Glib::ustring string = res.text; if (regex->match(string, match)) {