fix: YT shorts view count parsing

This commit is contained in:
ThetaDev 2023-03-21 23:43:34 +01:00
parent 5b63a3e3a8
commit 76052de72a
2 changed files with 4 additions and 2 deletions

View File

@ -327,9 +327,11 @@ public class YoutubeStreamInfoItemExtractor implements StreamInfoItemExtractor {
// found in this case
final String viewCountText = getTextFromObject(videoInfo.getObject("viewCountText"));
final boolean isReelItem =
videoInfo.getString("videoType", "").equals("REEL_VIDEO_TYPE_VIDEO");
if (!isNullOrEmpty(viewCountText)) {
try {
return getViewCountFromViewCountText(viewCountText, false);
return getViewCountFromViewCountText(viewCountText, isReelItem);
} catch (final Exception ignored) {
}
}

View File

@ -8,7 +8,7 @@ public class DownloaderFactory {
public static final String RESOURCE_PATH = "src/test/resources/org/schabi/newpipe/extractor/";
private static final DownloaderType DEFAULT_DOWNLOADER = DownloaderType.RECORDING;
private static final DownloaderType DEFAULT_DOWNLOADER = DownloaderType.REAL;
public static DownloaderType getDownloaderType() {
try {