TeamNewPipe / NewPipeExtractor

NewPipe's core library for extracting data from streaming sites
GNU General Public License v3.0
1.36k stars 405 forks source link

[YouTube] Cannot get contents of some auto-generated channels #611

Open westlinkin opened 3 years ago

westlinkin commented 3 years ago

Like:

Music: https://www.youtube.com/channel/UC-9-kyTW8ZkZNDHQJ6FgpwQ

Gaming: https://www.youtube.com/gaming

for Music channel: there are just empty relatedItems

for Gaming channel, here is the log:

2021-04-14 00:21:05.691 24560-24694/com.example.app W/System.err: org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException: Not found ("404 ")
2021-04-14 00:21:05.692 24560-24694/com.example.app W/System.err:     at org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getValidJsonResponseBody(YoutubeParsingHelper.java:602)
2021-04-14 00:21:05.692 24560-24694/com.example.app W/System.err:     at org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getJsonResponse(YoutubeParsingHelper.java:662)
2021-04-14 00:21:05.692 24560-24694/com.example.app W/System.err:     at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeChannelExtractor.onFetchPage(YoutubeChannelExtractor.java:85)
2021-04-14 00:21:05.692 24560-24694/com.example.app W/System.err:     at org.schabi.newpipe.extractor.Extractor.fetchPage(Extractor.java:54)
2021-04-14 00:21:05.692 24560-24694/com.example.app W/System.err:     at org.schabi.newpipe.extractor.channel.ChannelInfo.getInfo(ChannelInfo.java:47)
2021-04-14 00:21:05.692 24560-24694/com.example.app W/System.err:     at com.example.app.v2.MainV2Act$onCreate$7.invoke(MainV2Act.kt:203)
2021-04-14 00:21:05.692 24560-24694/com.example.app W/System.err:     at com.example.app.v2.MainV2Act$onCreate$7.invoke(MainV2Act.kt:37)
2021-04-14 00:21:05.692 24560-24694/com.example.app W/System.err:     at org.jetbrains.anko.AsyncKt$doAsync$1.invoke(Async.kt:143)
2021-04-14 00:21:05.692 24560-24694/com.example.app W/System.err:     at org.jetbrains.anko.AsyncKt$doAsync$1.invoke(Unknown Source:0)
2021-04-14 00:21:05.693 24560-24694/com.example.app W/System.err:     at org.jetbrains.anko.AsyncKt$sam$java_util_concurrent_Callable$0.call(Unknown Source:2)
2021-04-14 00:21:05.693 24560-24694/com.example.app W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2021-04-14 00:21:05.693 24560-24694/com.example.app W/System.err:     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
2021-04-14 00:21:05.693 24560-24694/com.example.app W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2021-04-14 00:21:05.693 24560-24694/com.example.app W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2021-04-14 00:21:05.693 24560-24694/com.example.app W/System.err:     at java.lang.Thread.run(Thread.java:923)
AudricV commented 3 years ago

We need to change something when extracting these channels. It returns 404 because NewPipe adds a /c/ before gaming, which isn't recognized by YouTube.

westlinkin commented 3 years ago

We need to change something when extracting these channels. It returns 404 because NewPipe adds a /c/ before gaming, which isn't recognized by YouTube.

what about the music channel?

AudricV commented 3 years ago

For the music channel, this channel has no Videos tab. Channel extraction on NewPipe Extractor relies currently on the Videos tab for now. Some work for the channel tabs extraction has been already made in #279. However, someone needs to reuse the work already made to create a new PR rebased on the dev branch.