Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7583457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:40:55+00:00 2026-05-30T18:40:55+00:00

Sometimes I get this error when extracting youtube videos by json, here’s an example:

  • 0

Sometimes I get this error when extracting youtube videos by json, here’s an example:

XMLHttpRequest can not load https://gdata.youtube.com/feeds/api/users/IcarusTouma?&alt=json. Origin http://localhost is not allowed by Access-Control-Allow-Origin.

I tried with jsonp, but youtube does not accept jsonp.

So extract videos from youtube.

$. getJSON ('https://gdata.youtube.com/feeds/api/videos/' + id_video + '? & alt = json', function (data) {
if (typeof data! == "undefined" && data)
{
     var title = data ['entry'] ['title'] ['$ t'];
     var thumb = data ['entry'] ['media $ group'] ['media $ thumbnail'] [0] ['url'];
     var title = data ['entry'] ['author'] [0] ['name'] ['$ t'];
     $. getJSON ('https://gdata.youtube.com/feeds/api/users/' + author + '? & alt = json', function (data) {

     author_thumbnail var = data ['entry'] ['media $ thumbnail'] ['url'];
     $ ('.items').append(html_carousel (thumb, title, author_thumbnail, author, 5,' youtube ', id_video, author'));

     });
}
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T18:40:56+00:00Added an answer on May 30, 2026 at 6:40 pm

    Having just checked the YouTube Data API reference documentation, for both JSON and the newer JSON-C formats, they both accept JSON-P, allowing you to specify the callback by the callback GET string parameter. This link will demonstrate that this is true:

    https://gdata.youtube.com/feeds/api/videos?q=baseball&v=2&alt=jsonc&callback=functionName

    The long JSON object return is wrapped in the function call to functionName, in this case. The next URL is the same call, but in the older (and somewhat deprecated) JSON format:

    https://gdata.youtube.com/feeds/api/videos?q=baseball&v=2&alt=json&callback=functionName

    The data is a bit different, but same result set, wrapped in another call to functionName. Now, these calls were queries to get the videos that matched the search param (“baseball”). But I’m sure perusing their reference documents (for the JSON-C and JSON formats) will yield what you need to make this work properly, as a JSONP call, specifying the callback in the query string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sometimes I get a broken background in Chrome. I do not get this error
I get this error randomly, sometimes it shows and sometimes not! The Error: Now
I sometimes get this error when I run the JUnit tests. I'm not exactly
I just can't figure it out, why i get this error. It is not
I get this error sometimes, Catchable fatal error: Object of class stdClass could not
Sometimes users mistakenly redirected to ?Process=ViewImages&PAGEID=. When this happens, they get the following error.
When I transfer a file about 50Mb over HTTP sometimes I get this error:
Sometimes in execution I get this error message in VS2010 when trying to free
I get this error sometimes invalid byte sequence in UTF-8 when I read contents
I try to deploy my app and sometimes get this error: Failure [INSTALL_FAILED_CONTAINER_ERROR] I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.