 
         return results
     }
+
+    // The App Store often lists a newer version available in an app's page than in
+    // the search results. We attempt to scrape it here.
+    private func scrapeVersionFromPage(_ pageUrl: URL, _ completion: @escaping (Version?) -> Void) {
+        networkManager.loadData(from: pageUrl) { result in
+            guard case let .success(pageData) = result else {
+                completion(nil)
+                return
+            }
+
+            let html = String(decoding: pageData, as: UTF8.self)
+            let fullRange = NSRange(html.startIndex..<html.endIndex, in: html)
+            guard let match = MasStoreSearch.versionExpression?.firstMatch(in: html, range: fullRange),
+                let range = Range(match.range(at: 1), in: html),
+                let version = Version(tolerant: html[range])
+            else {
+                completion(nil)
+                return
+            }
+
+            completion(version)
+        }
+    }
 }

            throw MASError.jsonParsing(error: error as NSError)
        }

        // The App Store often lists a newer version available in an app's page than in
        // the search results. We attempt to scrape it here.
        let group = DispatchGroup()
        for index in results.results.indices {
            let result = results.results[index]

            }

            group.enter()
            scrapeVersionFromPage(pageUrl) { pageVersion in
                if let pageVersion = pageVersion, pageVersion > searchVersion {
                    results.results[index].version = pageVersion.description
                }

