parse method

Future<Video> parse(
  1. String link
)

Implementation

Future<Video> parse(String link) async {
  if (Detect().validate(link, "sibnet")) {
    try {
      final response = await _dio.get(link);
      final url =
          "https://video.sibnet.ru${_parseRes(response.data.toString())!}";
      return Video(480, "mp4", url, {"Referer": url});
    } on DioException {
      throw Exception("An error has occurred");
    }
  } else {
    throw BadDataException("Bad url!");
  }
}