attempted switch to dio (still using http for partial dnwloads/headers)

This commit is contained in:
Imran Remtulla
2024-03-17 01:51:53 -04:00
parent 9dae24ace6
commit ab43856b90
27 changed files with 321 additions and 170 deletions

View File

@@ -1,5 +1,5 @@
import 'package:dio/dio.dart';
import 'package:html/parser.dart';
import 'package:http/http.dart';
import 'package:obtainium/custom_errors.dart';
import 'package:obtainium/providers/source_provider.dart';
@@ -20,7 +20,7 @@ class WhatsApp extends AppSource {
Response res =
await sourceRequest('$standardUrl/android', additionalSettings);
if (res.statusCode == 200) {
var targetLinks = parse(res.body)
var targetLinks = parse(res.data)
.querySelectorAll('a')
.map((e) => e.attributes['href'] ?? '')
.where((e) => e.isNotEmpty)