fix: youtube_explode_dart failing for many videos due to youtube ios client visitor data change

This commit is contained in:
Kingkor Roy Tirtho 2025-03-05 22:13:42 +06:00
parent f4b1e550bf
commit 677f95f266
4 changed files with 20 additions and 23 deletions

View File

@ -25,12 +25,12 @@ import 'package:spotube/services/sourced_track/sourced_track.dart';
import 'package:spotube/utils/service_utils.dart'; import 'package:spotube/utils/service_utils.dart';
import 'package:youtube_explode_dart/youtube_explode_dart.dart'; import 'package:youtube_explode_dart/youtube_explode_dart.dart';
const _deviceClients = { final _deviceClients = Set.unmodifiable({
YoutubeApiClient.android,
YoutubeApiClient.ios, YoutubeApiClient.ios,
YoutubeApiClient.android,
YoutubeApiClient.mweb, YoutubeApiClient.mweb,
YoutubeApiClient.safari, YoutubeApiClient.safari,
}; });
String? get _randomUserAgent => _deviceClients String? get _randomUserAgent => _deviceClients
.elementAt( .elementAt(

View File

@ -16,6 +16,7 @@ class YouTubeExplodeEngine implements YouTubeEngine {
videoId, videoId,
requireWatchPage: false, requireWatchPage: false,
ytClients: [ ytClients: [
YoutubeApiClient.ios,
YoutubeApiClient.android, YoutubeApiClient.android,
YoutubeApiClient.mweb, YoutubeApiClient.mweb,
], ],

View File

@ -1415,14 +1415,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.0" version: "3.0.0"
lists:
dependency: transitive
description:
name: lists
sha256: "4ca5c19ae4350de036a7e996cdd1ee39c93ac0a2b840f4915459b7d0a7d4ab27"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
local_notifier: local_notifier:
dependency: "direct main" dependency: "direct main"
description: description:
@ -2128,6 +2120,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "10.1.3" version: "10.1.3"
simple_sparse_list:
dependency: transitive
description:
name: simple_sparse_list
sha256: aa648fd240fa39b49dcd11c19c266990006006de6699a412de485695910fbc1f
url: "https://pub.dev"
source: hosted
version: "0.1.4"
skeletonizer: skeletonizer:
dependency: "direct main" dependency: "direct main"
description: description:
@ -2465,10 +2465,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: unicode name: unicode
sha256: "0f69e46593d65245774d4f17125c6084d2c20b4e473a983f6e21b7d7762218f1" sha256: "48f8b6c50ed70ba61647f4987d56ec505923041956bbdb651db2838ce7b47b58"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.3.1" version: "1.1.7"
universal_io: universal_io:
dependency: transitive dependency: transitive
description: description:
@ -2736,12 +2736,11 @@ packages:
youtube_explode_dart: youtube_explode_dart:
dependency: "direct main" dependency: "direct main"
description: description:
path: "." name: youtube_explode_dart
ref: e519db65ad0b0a40b12f69285932f9db509da3cf sha256: "3e1f1b5aa575670afc9dbc96cece23af78f9ec2044ce0d9f70d136fff6c53b53"
resolved-ref: e519db65ad0b0a40b12f69285932f9db509da3cf url: "https://pub.dev"
url: "https://github.com/Hexer10/youtube_explode_dart.git" source: hosted
source: git version: "2.4.0-dev.1"
version: "2.3.7"
yt_dlp_dart: yt_dlp_dart:
dependency: "direct main" dependency: "direct main"
description: description:

View File

@ -132,10 +132,7 @@ dependencies:
wikipedia_api: ^0.1.0 wikipedia_api: ^0.1.0
win32_registry: ^1.1.5 win32_registry: ^1.1.5
window_manager: ^0.4.3 window_manager: ^0.4.3
youtube_explode_dart: youtube_explode_dart: ^2.4.0-dev.1
git:
url: https://github.com/Hexer10/youtube_explode_dart.git
ref: e519db65ad0b0a40b12f69285932f9db509da3cf
yt_dlp_dart: yt_dlp_dart:
git: git:
url: https://github.com/KRTirtho/yt_dlp_dart.git url: https://github.com/KRTirtho/yt_dlp_dart.git