@Test public void testIsHardcodedClientVersionValid() throws IOException, ExtractionException { assertTrue("Hardcoded client version is not valid anymore", YoutubeParsingHelper.isHardcodedClientVersionValid()); }
public static boolean isHardcodedClientVersionValid() throws IOException, ExtractionException { final String url = "https: Map<String, List<String>> headers = new HashMap<>(); headers.put("X-YouTube-Client-Name", Collections.singletonList("1")); headers.put("X-YouTube-Client-Version", Collections.singletonList(HARDCODED_CLIENT_VERSION)); final String response = getDownloader().get(url, headers).responseBody(); return response.length() > 50; }
YoutubeParsingHelper { public static boolean isHardcodedClientVersionValid() throws IOException, ExtractionException { final String url = "https: Map<String, List<String>> headers = new HashMap<>(); headers.put("X-YouTube-Client-Name", Collections.singletonList("1")); headers.put("X-YouTube-Client-Version", Collections.singletonList(HARDCODED_CLIENT_VERSION)); final String response = getDownloader().get(url, headers).responseBody(); return response.length() > 50; } }
YoutubeParsingHelper { public static boolean isHardcodedClientVersionValid() throws IOException, ExtractionException { final String url = "https: Map<String, List<String>> headers = new HashMap<>(); headers.put("X-YouTube-Client-Name", Collections.singletonList("1")); headers.put("X-YouTube-Client-Version", Collections.singletonList(HARDCODED_CLIENT_VERSION)); final String response = getDownloader().get(url, headers).responseBody(); return response.length() > 50; } private  YoutubeParsingHelper(); }
YoutubeParsingHelper { public static boolean isHardcodedClientVersionValid() throws IOException, ExtractionException { final String url = "https: Map<String, List<String>> headers = new HashMap<>(); headers.put("X-YouTube-Client-Name", Collections.singletonList("1")); headers.put("X-YouTube-Client-Version", Collections.singletonList(HARDCODED_CLIENT_VERSION)); final String response = getDownloader().get(url, headers).responseBody(); return response.length() > 50; } private  YoutubeParsingHelper(); static Document parseAndCheckPage(final String url, final Response response); static boolean isYoutubeURL(URL url); static boolean isYoutubeServiceURL(URL url); static boolean isHooktubeURL(URL url); static boolean isInvidioURL(URL url); static int parseDurationString(final String input); static String getFeedUrlFrom(final String channelIdOrUser); static Calendar parseDateFrom(String textualUploadDate); static JsonObject getInitialData(String html); static boolean isHardcodedClientVersionValid(); static String getClientVersion(); static String getKey(); static boolean areHardcodedYoutubeMusicKeysValid(); static String[] getYoutubeMusicKeys(); static String getUrlFromNavigationEndpoint(JsonObject navigationEndpoint); static String getTextFromObject(JsonObject textObject, boolean html); static String getTextFromObject(JsonObject textObject); static String fixThumbnailUrl(String thumbnailUrl); static String getValidJsonResponseBody(final Response response); static JsonArray getJsonResponse(final String url, final Localization localization); static void defaultAlertsCheck(final JsonObject initialData); }
YoutubeParsingHelper { public static boolean isHardcodedClientVersionValid() throws IOException, ExtractionException { final String url = "https: Map<String, List<String>> headers = new HashMap<>(); headers.put("X-YouTube-Client-Name", Collections.singletonList("1")); headers.put("X-YouTube-Client-Version", Collections.singletonList(HARDCODED_CLIENT_VERSION)); final String response = getDownloader().get(url, headers).responseBody(); return response.length() > 50; } private  YoutubeParsingHelper(); static Document parseAndCheckPage(final String url, final Response response); static boolean isYoutubeURL(URL url); static boolean isYoutubeServiceURL(URL url); static boolean isHooktubeURL(URL url); static boolean isInvidioURL(URL url); static int parseDurationString(final String input); static String getFeedUrlFrom(final String channelIdOrUser); static Calendar parseDateFrom(String textualUploadDate); static JsonObject getInitialData(String html); static boolean isHardcodedClientVersionValid(); static String getClientVersion(); static String getKey(); static boolean areHardcodedYoutubeMusicKeysValid(); static String[] getYoutubeMusicKeys(); static String getUrlFromNavigationEndpoint(JsonObject navigationEndpoint); static String getTextFromObject(JsonObject textObject, boolean html); static String getTextFromObject(JsonObject textObject); static String fixThumbnailUrl(String thumbnailUrl); static String getValidJsonResponseBody(final Response response); static JsonArray getJsonResponse(final String url, final Localization localization); static void defaultAlertsCheck(final JsonObject initialData); final static String BASE_YOUTUBE_INTENT_URL; }