Skip to content
This repository was archived by the owner on Sep 28, 2020. It is now read-only.

Commit f95898c

Browse files
committed
fixed issue 165
1 parent 5ef74fc commit f95898c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

YoutubeExtractor/YoutubeExtractor/DownloadUrlResolver.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,12 @@ private static string GetAdaptiveStreamMap(JObject json)
215215
{
216216
JToken streamMap = json["args"]["adaptive_fmts"];
217217

218-
return streamMap.ToString();
218+
// bugfix: adaptive_fmts is missing in some videos, use url_encoded_fmt_stream_map instead
219+
if (streamMap == null) {
220+
streamMap = json["args"]["url_encoded_fmt_stream_map"];
221+
}
222+
223+
return streamMap.ToString();
219224
}
220225

221226
private static string GetDecipheredSignature(string htmlPlayerVersion, string signature)

0 commit comments

Comments
 (0)