Skip to content

Commit

Permalink
[fix/ISSUE-80] Attempt to force download even if LOGIN_REQUIRED
Browse files Browse the repository at this point in the history
  • Loading branch information
azihassan committed Aug 16, 2024
1 parent 8b4d33c commit 879c59e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/parsers.d
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class SimpleYoutubeVideoURLExtractor : YoutubeVideoURLExtractor
this.html = html;
this.logger = logger;
parser = createDocument(html);
failIfUnplayable();
//failIfUnplayable();
}

this(string html, string baseJS, StdoutLogger logger)
Expand Down Expand Up @@ -182,6 +182,7 @@ unittest
assert(extractor.getID() == "Q_-p2q5FHy0");
}

/*
unittest
{
import std.exception : collectExceptionMsg;
Expand All @@ -192,6 +193,7 @@ unittest
string expectedExceptionMessage = "Video is unplayable because of status LOGIN_REQUIRED";
assert(exceptionMessage == expectedExceptionMessage, "Expected message " ~ expectedExceptionMessage ~ " but got " ~ exceptionMessage);
}
*/

enum AudioVisual : string
{
Expand Down Expand Up @@ -279,7 +281,7 @@ class AdvancedYoutubeVideoURLExtractor : YoutubeVideoURLExtractor
this.parser = createDocument(html);
this.baseJS = baseJS;
this.logger = logger;
failIfUnplayable();
//failIfUnplayable();
}

override string getURL(int itag, bool attemptDethrottle = false)
Expand Down

0 comments on commit 879c59e

Please sign in to comment.