Skip to content

Commit

Permalink
skip web request
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzhengyin committed Dec 6, 2021
1 parent 0bd2035 commit 93f546e
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ private YoutubeParsingHelper() {
public static final String YOUTUBEI_V1_URL = "https://www.youtube.com/youtubei/v1/";

private static final String HARDCODED_CLIENT_VERSION = "2.20210728.00.00";
private static final String HARDCODED_KEY = "hello";
private static final String MOBILE_YOUTUBE_KEY = "hello-df2KTyQ_vz_yYM39w";
private static final String HARDCODED_KEY = "";
private static final String MOBILE_YOUTUBE_KEY = "";
private static final String MOBILE_YOUTUBE_CLIENT_VERSION = "16.29.38";
private static String clientVersion;
private static String key;

private static final String[] HARDCODED_YOUTUBE_MUSIC_KEY =
{"hello-WEYFDNX30", "67", "1.20210726.00.01"};
{"", "67", "1.20210726.00.01"};
private static String[] youtubeMusicKey;

private static boolean keyAndVersionExtracted = false;
Expand Down Expand Up @@ -316,7 +316,8 @@ public static JsonObject getInitialData(final String html) throws ParsingExcepti

public static boolean areHardcodedClientVersionAndKeyValid()
throws IOException, ExtractionException {
if (hardcodedClientVersionAndKeyValid.isPresent()) {
return false;
/*if (hardcodedClientVersionAndKeyValid.isPresent()) {
return hardcodedClientVersionAndKeyValid.get();
}
// @formatter:off
Expand Down Expand Up @@ -351,7 +352,7 @@ public static boolean areHardcodedClientVersionAndKeyValid()
hardcodedClientVersionAndKeyValid = Optional.of(responseBody.length() > 5000
&& responseCode == 200); // Ensure to have a valid response
return hardcodedClientVersionAndKeyValid.get();
return hardcodedClientVersionAndKeyValid.get();*/
}

private static void extractClientVersionAndKey() throws IOException, ExtractionException {
Expand Down

0 comments on commit 93f546e

Please sign in to comment.