Closes #53
This commit is contained in:
Mattia 2020-07-29 19:27:15 +02:00
parent d6c1f8f02e
commit 428f0bdc7f
3 changed files with 7 additions and 11 deletions

View File

@ -1,8 +1,11 @@
## 1.4.2 - WIP ## 1.4.3 - WIP
- Implement `getSrt` a video closed captions in srt format. - Implement `getSrt` a video closed captions in srt format.
- Only throw custom exceptions from the library. - Only throw custom exceptions from the library.
- `getUploadsFromPage` no longer throws. - `getUploadsFromPage` no longer throws.
## 1.4.2
- Fix Decipher error #53
## 1.4.1+3 ## 1.4.1+3
- Fix decipherer - Fix decipherer

View File

@ -83,15 +83,8 @@ class PlayerSource {
} }
String _getDeciphererFuncBody() { String _getDeciphererFuncBody() {
if (_deciphererDefinitionBody != null) {
return _deciphererDefinitionBody;
}
var funcName = _funcBodyExp.firstMatch(_root).group(1);
var exp = RegExp(
r'(?!h\.)' '${RegExp.escape(funcName)}' r'=function\(\w+\)\{(.*?)\}');
return _deciphererDefinitionBody ??= return _deciphererDefinitionBody ??=
exp.firstMatch(_root).group(1).nullIfWhitespace; _funcBodyExp.firstMatch(_root).group(0);
} }
String _getDeciphererDefinitionBody(String deciphererFuncBody) { String _getDeciphererDefinitionBody(String deciphererFuncBody) {
@ -102,7 +95,7 @@ class PlayerSource {
'${RegExp.escape(objName)}' '${RegExp.escape(objName)}'
r'=\{(\w+:function\(\w+(,\w+)?\)\{(.*?)\}),?\};', r'=\{(\w+:function\(\w+(,\w+)?\)\{(.*?)\}),?\};',
dotAll: true); dotAll: true);
return exp.firstMatch(_root).group(0).nullIfWhitespace; return exp.firstMatch(_root)?.group(0)?.nullIfWhitespace;
} }
/// ///

View File

@ -1,6 +1,6 @@
name: youtube_explode_dart name: youtube_explode_dart
description: A port in dart of the youtube explode library. Supports several API functions without the need of Youtube API Key. description: A port in dart of the youtube explode library. Supports several API functions without the need of Youtube API Key.
version: 1.4.1+3 version: 1.4.2
homepage: https://github.com/Hexer10/youtube_explode_dart homepage: https://github.com/Hexer10/youtube_explode_dart
environment: environment: