MD5 校验值:61e58c10a11e4adec8760ee3854e996a
SoundcloudChannelExtractor.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package org.schabi.newpipe.extractor.services.soundcloud.extractors; import V1.z; import a4.c; import a4.d; import androidx.fragment.app.X; import f0.AbstractC1761a; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; import org.schabi.newpipe.extractor.Image; import org.schabi.newpipe.extractor.StreamingService; import org.schabi.newpipe.extractor.channel.ChannelExtractor; import org.schabi.newpipe.extractor.channel.tabs.ChannelTabs; import org.schabi.newpipe.extractor.downloader.Downloader; import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler; import org.schabi.newpipe.extractor.services.soundcloud.SoundcloudParsingHelper; import org.schabi.newpipe.extractor.services.soundcloud.linkHandler.SoundcloudChannelTabLinkHandlerFactory; import p4.r; public class SoundcloudChannelExtractor extends ChannelExtractor { private static final String USERS_ENDPOINT = "https://api-v2.soundcloud.com/users/"; private c user; private String userId; public SoundcloudChannelExtractor(StreamingService streamingService, ListLinkHandler listLinkHandler) { super(streamingService, listLinkHandler); } @Override public List<Image> getAvatars() { return SoundcloudParsingHelper.getAllImagesFromArtworkOrAvatarUrl(this.user.h("avatar_url", null)); } @Override public List<Image> getBanners() { return SoundcloudParsingHelper.getAllImagesFromVisualUrl(this.user.f("visuals").b("visuals").c(0).h("visual_url", null)); } @Override public String getDescription() { return this.user.h("description", ""); } @Override public String getFeedUrl() { return null; } @Override public String getId() { return this.userId; } @Override public String getName() { return this.user.h("username", null); } @Override public List<Image> getParentChannelAvatars() { return Collections.emptyList(); } @Override public String getParentChannelName() { return ""; } @Override public String getParentChannelUrl() { return ""; } @Override public long getSubscriberCount() { return this.user.e(0L, "followers_count"); } @Override public List<ListLinkHandler> getTabs() { String url = getUrl(); String h6 = r.h(url, SoundcloudChannelTabLinkHandlerFactory.getUrlSuffix("tracks")); String h7 = r.h(url, SoundcloudChannelTabLinkHandlerFactory.getUrlSuffix("playlists")); String h8 = r.h(url, SoundcloudChannelTabLinkHandlerFactory.getUrlSuffix(ChannelTabs.ALBUMS)); String id = getId(); ArrayList arrayList = new ArrayList(1); Object obj = new Object[]{"tracks"}[0]; ListLinkHandler listLinkHandler = new ListLinkHandler(h6, h6, id, X.w(obj, arrayList, obj, arrayList), ""); ArrayList arrayList2 = new ArrayList(1); Object obj2 = new Object[]{"playlists"}[0]; ListLinkHandler listLinkHandler2 = new ListLinkHandler(h7, h7, id, X.w(obj2, arrayList2, obj2, arrayList2), ""); Object[] objArr = {ChannelTabs.ALBUMS}; ArrayList arrayList3 = new ArrayList(1); Object obj3 = objArr[0]; Object[] objArr2 = {listLinkHandler, listLinkHandler2, new ListLinkHandler(h8, h8, id, X.w(obj3, arrayList3, obj3, arrayList3), "")}; ArrayList arrayList4 = new ArrayList(3); for (int i5 = 0; i5 < 3; i5++) { Object obj4 = objArr2[i5]; Objects.requireNonNull(obj4); arrayList4.add(obj4); } return Collections.unmodifiableList(arrayList4); } @Override public boolean isVerified() { return this.user.c("verified"); } @Override public void onFetchPage(Downloader downloader) { String id = getLinkHandler().getId(); this.userId = id; try { this.user = (c) z.h().H(downloader.get(AbstractC1761a.i(USERS_ENDPOINT, id, "?client_id=", SoundcloudParsingHelper.clientId()), getExtractorLocalization()).responseBody()); } catch (d e) { throw new ParsingException("Could not parse json response", e); } } }