NOT FETCHING YOUTUBE VIDEOS
the code it's not fetching youtube videos, actually it did like 3hours ago, didn't change nothing, but now randomly just doesn't fetch and i'm having this problem
and this is the code
21 Replies
Maybe you exceeded your daily quota (read,write, and upload take different number of units) or are running into some restrictions on your api key? I would take a look on the google cloud console and see what’s going on
this is the api
That’s the key , which I would revoke and use a new one esp if it’s unrestricted , you don’t want someone on here taking it .
Look on the console under your project to see the analytics about requests
u mean this ?
- go to cloud console
- select the correct project, which uses the YouTube API.
- find "APIs & Services" and select "Dashboard".
- Click on the "YouTube Data API v3" from the list of enabled APIs.
- select "Quotas" from the left-hand menu. You’ll see information about your API usage, including the number of requests made today and your remaining quota
If you have posted that key on other forums someone else may have taken it for a spin. Revoke it and generate a new key and try again whenever your quota resets
ok wait
created an project now should i create a credentials ?
Yes
ok now ifixed
it is fetching but still im getting some errors
??
it is actually showing the videos but still i'm having these errors ?
May be a browser extension , try disabling all your extensions
u think could be react developer tool ?
You also should set up some error handling in your displayVideos function too. And might want to consider using a caching plug-in to cut down on the number of requests.
I have no idea but it’s a possibility. Try disabling it and seeing
hmmm cutting down the number of requestts and handling error im not good with these tbh
You already have a try/catch in your fetchYoutubeVideos function. Implement a try/catch in the display function so that if the videos don’t load you log the error and set videoList.innerHTML = ‘<p>Error displaying videos</p>’; or whatever you want
if you're trying to just show videos of some account, why don't you use the rss feed?
I think its based on a keyword query search , possible user input but not sure. Just my guess based on the screenshot of the error where the query was “JavaScript Basics”.
i know, but if the goal of this is to just list videos of a channel, then the rss feed is a better option
what one writes and what one intends to do doesn't always correspond
in this case, if the goal isn't to actually have a functioning search, but to just list videos of channels, then using the feed is the way
Agree
what one writes and what one intends to do doesn't always correspondAin’t that the truth !
that's why ai will never win
but seriously, knowing the context (and intent) is very important