NewPipeExtractor
NewPipeExtractor copied to clipboard
Shorts InfoItems are not extracted from youtube channel
Checklist
- [X] I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
- [X] I am aware that this issue is being opened for the NewPipe Extractor, NOT the app, and my bug report will be dismissed otherwise.
- [X] I made sure that there are no existing issues - open or closed - which I could contribute my information to.
- [X] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
- [X] This issue contains only one bug.
- [X] I have read and understood the contribution guidelines.
Affected version
0.24.2
Steps to reproduce the bug
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)
}
}
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