How to Get and display the list of youtube videos using javascript

后端 未结 3 1991
忘了有多久
忘了有多久 2020-12-21 03:44

I have written a C code for getting the list of youtube videos for the url \"*http://gdata.youtube.com/feeds/api/standardfeeds/top_rated*\" using the libsoup library. I can

3条回答
  •  春和景丽
    2020-12-21 04:11

    Yes, you can ^^

    The youtube-API also provides jsonp, which returns the data as a JS-command.
    Watch this(and see the parameters inside the URL):
    http://gdata.youtube.com/feeds/api/standardfeeds/top_rated?alt=json&callback=someFunction

    With jsonp you don't have any sameOriginPolicies-restrictions, while it not works with AJAX.

    It would be easy using a library like jQuery.

    If you don't want to use jQuery or anything like this, you have to inject a

提交回复
热议问题