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

Commit 06a07f9

Browse files
committed
Fix the video removal check
1 parent 88b8783 commit 06a07f9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

YoutubeExtractor/YoutubeExtractor/DownloadUrlResolver.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,14 @@ private static string GetStreamMap(JObject json)
127127
{
128128
JToken streamMap = json["args"]["url_encoded_fmt_stream_map"];
129129

130-
if (streamMap == null || streamMap["been+removed"] != null)
130+
string streamMapString = streamMap == null ? null : streamMap.ToString();
131+
132+
if (streamMapString == null || streamMapString.Contains("been+removed"))
131133
{
132134
throw new VideoNotAvailableException("Video is removed");
133135
}
134136

135-
return streamMap.ToString();
137+
return streamMapString;
136138
}
137139

138140
private static IEnumerable<VideoInfo> GetVideoInfos(IEnumerable<Uri> downloadUrls, string videoTitle)

0 commit comments

Comments
 (0)