Closed zaednasr closed 1 month ago
0.24.2
Code example:
fun getChannelData(url: String) { try { val url = "https://www.youtube.com/@bstchld" val req = ChannelInfo.getInfo(ServiceList.YouTube, url) for (tab in req.tabs) { if (listOf("videos", "shorts", "livestreams").contains(tab.contentFilters[0])) { val tabInfo = ChannelTabInfo.getInfo(ServiceList.YouTube, tab) val tmp = getChannelTabData(tab, tabInfo) if (tmp.isFailure) continue } } }catch (e: Exception) { return Result.failure(e) } } private fun getChannelTabData(linkHandler: ListLinkHandler, tabInfo: ChannelTabInfo) { try { var nextPage : Page? = null while (true) { val req = if (nextPage == null) { if (tabInfo.hasNextPage()) { nextPage = tabInfo.nextPage } tabInfo.relatedItems.toList() } else { val tmp = ChannelTabInfo.getMoreItems(ServiceList.YouTube, linkHandler, nextPage) nextPage = if (tmp.hasNextPage()) tmp.nextPage else null tmp.items.toList() } println(req) if (req.isEmpty()) return Result.failure(Throwable()) if (nextPage == null || req.isEmpty()) break } return Result.success() }catch (e: Exception) { return Result.failure(e) } }
In example code Videos, Livestreams and Shorts need to be extracted but shorts don't
Only videos and livestreams are extracted in my code
No response
I had implemented the extractor almost a month ago and this functionality had worked before, but im noticing its broken now. Please review
Fixed by #1221.
Checklist
Affected version
0.24.2
Steps to reproduce the bug
Code example:
Expected behavior
In example code Videos, Livestreams and Shorts need to be extracted but shorts don't
Actual behavior
Only videos and livestreams are extracted in my code
Screenshots/Screen recordings
No response
Logs
No response
Additional information
I had implemented the extractor almost a month ago and this functionality had worked before, but im noticing its broken now. Please review