Page 29 of 30

Re: YouTube

PostPosted: Sun Apr 12, 2020 8:22 pm
by Ellesworth
Thanks to evryone involved! This now works a charm for me, with my own API on Serviio 2.0 and Win10

Re: YouTube

PostPosted: Sun Apr 12, 2020 8:48 pm
by RaNd
Thanks, changing the API key did thw trick!

On Debian 9, v2.0

mame32 wrote:I had the same error on logs:

[FeedUpdaterWorker] An error occured while parsing the online resource 'https://...', will try again soon: Unexpected error while invoking plugin (YouTube): Text must not be null or empty
...

To solve I have added my own APIKEY from my Google Developer Account.
The problem is that the current APIKEY included into the file "Youtube.goovy"

  Code:
final api_key = "AIzaSyCbFQoC....SqGVE243q0"


reaches the limit of 10000 calls per day, because all of us are been using this APIKEY.

Solution:

1. I have had to learn how to create my own APIKEY on Google and activate it.

https://www.slickremix.com/docs/get-api-key-for-youtube/

2. Then I have edited the Youtube.groovy file replacing api_key with mine.

This works form me! :D

Now the Serviio.log file only shows this warning:
[WebResourceParser] Plugin YouTube returned no value for resource item 'null'
on every online resource, but it captures the online source.

Thanks!

Re: YouTube

PostPosted: Tue Apr 21, 2020 10:15 pm
by angelodl78
Hi,

I have copied the .groovy file in the plugin folder + added a couple of youtube links following the guide on the 1st post - but nothing shows up on the media browser and in the log I can see the following error:
2020-04-21 23:51:50,753 WARN [FeedUpdaterWorker] An error occured while parsing the online resource https://www.googleapis.com/youtube/v3/v ... ostPopular, waiting for expiry time to try again: Error during feed reading. Message: URL 'https://www.googleapis.com/youtube/v3/videos?chart=mostPopular' returned status code '400'
org.serviio.library.online.metadata.OnlineResourceParseException: Error during feed reading. Message: URL 'https://www.googleapis.com/youtube/v3/videos?chart=mostPopular' returned status code '400'
at org.serviio.library.online.feed.FeedParser.parse(FeedParser.java:109)
at org.serviio.library.online.OnlineLibraryManager.findResource(OnlineLibraryManager.java:185)
at org.serviio.library.online.OnlineLibraryManager.findResourceInCacheOrParse(OnlineLibraryManager.java:207)
at org.serviio.library.online.metadata.FeedUpdaterWorker.getOnlineItems(FeedUpdaterWorker.java:194)
at org.serviio.library.online.metadata.FeedUpdaterWorker.run(FeedUpdaterWorker.java:100)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.serviio.util.HttpConnectionException: URL 'https://www.googleapis.com/youtube/v3/videos?chart=mostPopular' returned status code '400'
at org.serviio.util.HttpClient.retrieveStreamFromConnection(HttpClient.java:203)
at org.serviio.util.HttpClient.retrieveBinaryFileFromURL(HttpClient.java:89)
at org.serviio.util.HttpClient.retrieveBinaryFileFromURL(HttpClient.java:105)
at org.serviio.library.online.feed.FeedParser.parseFeedStream(FeedParser.java:120)
at org.serviio.library.online.feed.FeedParser.parse(FeedParser.java:89)


I have just installed serviio on my lubuntu server 18.04, and the youtube bit would be essential for me.
How can I fix it?
Thanks

Re: YouTube

PostPosted: Wed Apr 22, 2020 6:27 am
by MarkRoy
Since YouTube has implemented reCAPTCHA the YouTube.Groovy has stopped working. Until/unless the developer of YouTube.Groovy uncovers a way to deal with the reCAPTCHA issue.. this .groovy will not work and has not worked for more than two years now.

Re: YouTube

PostPosted: Wed Apr 22, 2020 11:28 am
by angelodl78
MarkRoy wrote:Since YouTube has implemented reCAPTCHA the YouTube.Groovy has stopped working. Until/unless the developer of YouTube.Groovy uncovers a way to deal with the reCAPTCHA issue.. this .groovy will not work and has not worked for more than two years now.


Thanks for the reply, at least I know it now.
Is there an alternative way to get YouTube videos in servizio somehow?

Re: YouTube

PostPosted: Wed Apr 22, 2020 1:04 pm
by atc98092
It's highly unlikely there's any workaround for reCAPTCHA. After all, it's specifically designed to require human interaction to pass through. With the number of spam posts I delete on this site daily, I hope there is not a way around it. It's bad enough now, so we just have to accept that we can't access sites like YouTube any longer.

Re: YouTube

PostPosted: Wed Apr 22, 2020 2:31 pm
by RaNd
Since we are using the API I don't think that we are going to have an issue with the reCAPTCH.
After changing to my private API key, I have 0 issues.

Re: YouTube

PostPosted: Wed Apr 22, 2020 8:51 pm
by atc98092
RaNd wrote:Since we are using the API I don't think that we are going to have an issue with the reCAPTCH.
After changing to my private API key, I have 0 issues.

That makes sense. You would expect the API to not require it.

Re: YouTube

PostPosted: Wed Apr 22, 2020 9:17 pm
by DVD Listing
RaNd wrote:Thanks, changing the API key did thw trick!

On Debian 9, v2.0

mame32 wrote:I had the same error on logs:

[FeedUpdaterWorker] An error occured while parsing the online resource 'https://...', will try again soon: Unexpected error while invoking plugin (YouTube): Text must not be null or empty
...

To solve I have added my own APIKEY from my Google Developer Account.
The problem is that the current APIKEY included into the file "Youtube.goovy"

  Code:
final api_key = "AIzaSyCbFQoC....SqGVE243q0"


reaches the limit of 10000 calls per day, because all of us are been using this APIKEY.

Solution:

1. I have had to learn how to create my own APIKEY on Google and activate it.

https://www.slickremix.com/docs/get-api-key-for-youtube/

2. Then I have edited the Youtube.groovy file replacing api_key with mine.

This works form me! :D

Now the Serviio.log file only shows this warning:
[WebResourceParser] Plugin YouTube returned no value for resource item 'null'
on every online resource, but it captures the online source.

Thanks!




I have created my own API key as listed in solution 1. above.
And I have done steps 1 - 8 on that web page.

But I cannot find the youtube webpage stated in step 9 to insert my APIKey.

Can anybody help me out?

Re: YouTube

PostPosted: Wed Apr 22, 2020 9:22 pm
by atc98092
I don't think you use step 9. I believe you take the API key you created and add it to the youtube.groovy file in place of the key that's already contained in the file.

Re: YouTube

PostPosted: Thu Apr 23, 2020 4:47 pm
by DVD Listing
Thanks for the reply @atc98092.

Well, the process didn't work for me.
I followed the process exactly.

I see the folders of the channels I subscribe to (as before), but still no contents within the folders :evil:

Re: YouTube

PostPosted: Thu Apr 23, 2020 5:11 pm
by RaNd
DVD Listing wrote:Thanks for the reply @atc98092.

Well, the process didn't work for me.
I followed the process exactly.

I see the folders of the channels I subscribe to (as before), but still no contents within the folders :evil:


You take the API key from step 8 and you use it the the YouTube.groovy file, replacing the API key there.
line 53,
final api_key=Your_New_API_KEY

"Almost done, wait for google to create your new project and you should see the screen below where you can copy your API Key."

Re: YouTube

PostPosted: Sun May 03, 2020 6:59 pm
by norm
RaNd wrote:You take the API key from step 8 and you use it the the YouTube.groovy file, replacing the API key there.
line 53,
final api_key=Your_New_API_KEY

"Almost done, wait for google to create your new project and you should see the screen below where you can copy your API Key."

@RaNd: Thanks for your and Zip's work on this. Works fine for me. Register for my own API key, pop it in the Youtube.groovy file, put the updated Youtube.groovy in the plug-ins folder and off you go :)

Re: YouTube

PostPosted: Mon Jul 06, 2020 3:23 pm
by MarkRoy
Jumped through all the hoops, created a project and got my own API Key.

Swapped it out for the "Serviio" Key in Youtube.Groovy...

Wait for it...

Voila!! Youtube online service working again! HOORAY!!!

Re: YouTube

PostPosted: Mon Oct 19, 2020 11:00 am
by Miro1001
Hello,
Thanks a lot for all work. Just to note Yahoo stopped refreshing from 18.10.2020. It worked flawlessly with own API key, replacing the one in Serviio Yahoo plugin. Does anybody have Yahoo still working?

Re: YouTube

PostPosted: Wed Oct 21, 2020 4:40 am
by MarkRoy
This feature of Serviio is one of the things I loved MOST about this server from the very start.

Unfortunately, it has had a very rocky support problem for several years. And not so much from the Serviio side but from changes YouTube makes.
We must persevere and continue to experiment with techniques to discover how to make this work through YouTube's perturbations!

Over the past several months I have updated my API Key a dozen times. Each time, the change works for about 24 hours.. then fails again.
Not sure why this happens and haven't had the spare time to dig further into the symptoms causing the failure.

Cheers!

-=> Mark Roy <=-

Re: YouTube

PostPosted: Wed Oct 21, 2020 9:12 am
by Miro1001
"Just to note Yahoo stopped refreshing from 18.10.2020. It worked flawlessly with own API key, replacing the one in Serviio Yahoo plugin. Does anybody have Yahoo still working?"

Sorry, I meant Youtube of course, instead of Yahoo :-). Have to see a doctor first, before writing here.

Serviio shows all Youtube channels and requests in the Online folder, with thumbnails, which get refreshed too, but their folders are empty. There are no errors in the log. Very strange. Got a second API key, the same behavior. Probably they changed something from the Youtube side again. Please somebody with knowledge to have a look at the Youtube plugin, when nothing else to do:-). Thanks a lot!

Re: YouTube

PostPosted: Fri Oct 23, 2020 5:59 pm
by Miro1001
Just FYI, it seems that the Youtube plugin works on Windows 7 so far (from home static IP). It stopped refreshing on my Mac with error 429 from Youtube, which means "too many connections". It works from another IP or through VPN though, so it seems Youtube is very sensitive about the number and timing of connections and may easily give you a 429 error. But the plugin still works fine. Cheers.

Re: YouTube

PostPosted: Sat Dec 12, 2020 1:09 pm
by RaNd
Miro1001 wrote:Just FYI, it seems that the Youtube plugin works on Windows 7 so far (from home static IP). It stopped refreshing on my Mac with error 429 from Youtube, which means "too many connections". It works from another IP or through VPN though, so it seems Youtube is very sensitive about the number and timing of connections and may easily give you a 429 error. But the plugin still works fine. Cheers.


Read the Google API quota documentation, https://developers.google.com/analytics ... its-quotas
Monitor quota https://support.google.com/a/answer/6301355?hl=en

You could create multiple accounts, multiple APIs and rotate them every X hours, by replacing the API key or having multiple groovy files with different APIs, rotating them by script and restarting serviio.

Re: YouTube

PostPosted: Mon Jun 14, 2021 2:36 pm
by Miro1001
Hello, thanks for this information.

Can't get Youtube working again, may be something has changed and Youtube groovy needs remastering?
The error from log:

2021-06-14 17:23:55,892 DEBUG [WebResourceParser] Unexpected error during url extractor plugin invocation (YouTube) for item null: https://www.youtube.com/get_video_info? ... l=US&hl=en
java.io.FileNotFoundException: https://www.youtube.com/get_video_info? ... l=US&hl=en
at YouTube.extractUrl(Youtube.groovy:109)

The same (Youtube.groovy:109) error on each request on each item, which previously worked. API key is fine.
Anyone still using Youtube plugin?