Compare commits

...

3 Commits

Author SHA1 Message Date
Imran
3af185b0f8 Merge pull request #2552 from aminosred25/aminosred25-patch-1
Try to handle response body as a JSON first before handling it as a p…
2025-09-21 16:56:50 -04:00
aminosred25
bfbb2710b6 Try to handle response body as a JSON first before handling it as a plain text 2025-09-21 22:33:57 +02:00
Imran
c81c3c5ea7 Merge pull request #2551 from ImranR98/dev
- Add 'sky22333/hubproxy' support for GitHub (#2513)
- Fix error in Vivo Store search when no result found (#2494)
- Correct a log string (#2519)
- Loose auto-filtering for farsroid.com (#2441)
- Re-enable auto-filtering for farsroid.com w/ toggle to disable it (#2441)
- Enable long-press and double-tap gestures on app icon in apps list (#2444, #2448)
2025-09-21 14:14:37 -04:00

View File

@@ -146,10 +146,7 @@ Future<List<MapEntry<String, String>>> grabLinksCommon(
.map((e) => MapEntry(ensureAbsoluteUrl(e.key, reqUrl), e.value))
.toList();
if (allLinks.isEmpty || matchLinksOutsideATags) {
allLinks = getLinksInLines(rawBody);
}
if (allLinks.isEmpty) {
// Getting desperate
// Decode the body if the response is a JSON
try {
var jsonStrings = collectAllStringsFromJSONObject(jsonDecode(rawBody));
allLinks = getLinksInLines(jsonStrings.join('\n'));
@@ -163,7 +160,7 @@ Future<List<MapEntry<String, String>>> grabLinksCommon(
);
}
} catch (e) {
//
allLinks = getLinksInLines(rawBody);
}
}
List<MapEntry<String, String>> links = [];