File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -680,18 +680,10 @@ private static void extractClientVersionAndKeyFromHtmlSearchResultsPage()
680680 } catch (final Parser .RegexException ignored ) {
681681 }
682682
683- if (isNullOrEmpty (key )) {
684- throw new ParsingException (
685- // CHECKSTYLE:OFF
686- "Could not extract YouTube WEB InnerTube API key from HTML search results page" );
687- // CHECKSTYLE:ON
688- }
689-
690- if (clientVersion == null ) {
691- throw new ParsingException (
692- // CHECKSTYLE:OFF
693- "Could not extract YouTube WEB InnerTube client version from HTML search results page" );
694- // CHECKSTYLE:ON
683+ if (isNullOrEmpty (key ) || clientVersion == null ) {
684+ throw new ParsingException ("Could not extract YouTube WEB InnerTube "
685+ + (isNullOrEmpty (key ) ? "API key" : "client version" )
686+ + " from HTML search results page" );
695687 }
696688
697689 keyAndVersionExtracted = true ;
You can’t perform that action at this time.
0 commit comments