APKPure, SourceHut, Bugfixes

This commit is contained in:
Imran Remtulla
2023-05-05 22:35:32 -04:00
parent 84b512f282
commit fb9e66332d
23 changed files with 445 additions and 122 deletions

View File

@ -66,14 +66,14 @@ class FDroid extends AppSource {
String? appId = tryInferringAppId(standardUrl);
String host = Uri.parse(standardUrl).host;
return getAPKUrlsFromFDroidPackagesAPIResponse(
await get(Uri.parse('https://$host/api/v1/packages/$appId')),
await sourceRequest('https://$host/api/v1/packages/$appId'),
'https://$host/repo/$appId',
standardUrl);
}
@override
Future<Map<String, List<String>>> search(String query) async {
Response res = await get(Uri.parse('https://search.$host/?q=$query'));
Response res = await sourceRequest('https://search.$host/?q=$query');
if (res.statusCode == 200) {
Map<String, List<String>> urlsWithDescriptions = {};
parse(res.body).querySelectorAll('.package-header').forEach((e) {