如何使用 YouTube API v3 获取 YouTube 视频的完整描述



我需要在我访问的特定频道中获取有关videos的详细信息。

我无法获得整个描述,只显示几个单词,然后是...

我使用了以下代码

$string = file_get_contents("https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCuCQXqQLAQuTObCGlTYDE3w&maxResults=50&order=date&key=API_KEY_HERE&fields=nextPageToken,pageInfo,items(id(videoId),snippet(title,description,channelTitle,thumbnails(high(url))))");
$json_a = json_decode($string, true);
print_r($json_a);die;

这是 JSON 响应

{
 "nextPageToken": "CDIQAA",
 "pageInfo": {
  "totalResults": 228,
  "resultsPerPage": 50
 },
 "items": [
  {
   "id": {
    "videoId": "TK7-Vh6gnkc"
   },
   "snippet": {
    "title": "MINI Living | 2016 Salone del Mobile, Milan",
    "description": "Witness the MINI Living Installation in action at the 2016 Salone del Mobile in Milan and discover the inspiration behind the Creative Use of Space philosophy.",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/TK7-Vh6gnkc/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "LRmuwlHrN88"
   },
   "snippet": {
    "title": "MINI Living | Preview: A Vision for Shared Living",
    "description": "World-class design, innovation and creativity. Preview MINI's vision for shared living. Watch the complete film: Visions for Shared Living: ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/LRmuwlHrN88/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "JFAwE5lhFW0"
   },
   "snippet": {
    "title": "The MINI 3-Door Hatch | Discover Driving Excitement",
    "description": "Go-kart handling and premium design take shape in the form of the original MINI 3-Door Hatch. Explore the city like never before with superior driving dynamics ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/JFAwE5lhFW0/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "AFnHshLgRuQ"
   },
   "snippet": {
    "title": "This Day Forward (Teaser 4) | The New MINI Convertible.",
    "description": "Driving into the sunset is something we all aspire to, but what does it take to make it happen? Watch Jake prove it possible in the new short film “This Day ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/AFnHshLgRuQ/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "aGJd7xy8z5M"
   },
   "snippet": {
    "title": "This Day Forward (Teaser 2) | The New MINI Convertible.",
    "description": "Passions aren't something to merely sign away. See how Jake decides his fate in the new short film “This Day Forward”: bit.ly/MINI--Convertible-- Subscribe to ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/aGJd7xy8z5M/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "t3sxB91Fvlc"
   },
   "snippet": {
    "title": "This Day Forward (Teaser 3) | The New MINI Convertible.",
    "description": "Do you stay or do you go? See whether Jake decides to play it safe or take a risk in the new short film “This Day Forward”: bit.ly/_MINIConvertible-- Subscribe to ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/t3sxB91Fvlc/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "3fzvNV3HIrQ"
   },
   "snippet": {
    "title": "This Day Forward (Teaser 1) | The New MINI Convertible.",
    "description": "Ever have that feeling you've done this before? See how to make the most of those moments in the new short film “This Day Forward”: bit.ly/MINI__Convertible- ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/3fzvNV3HIrQ/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "2OA6sfWu-HU"
   },
   "snippet": {
    "title": "MINI Living | Preview: Architecture for Urban Living",
    "description": "Preview what architectural challenges are being investigated through the MINI Living Installation at this year's Salone del Mobile. Watch the complete interview: ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/2OA6sfWu-HU/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "G9ro6RKOHJc"
   },
   "snippet": {
    "title": "MINI Living | Origins",
    "description": "It's an architectural, conceptual installation where we try to combine the value of intimacy with the aspect of sharing.” Oke Hauser and Esther Bahne explain the ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/G9ro6RKOHJc/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "W663jtWQd1E"
   },
   "snippet": {
    "title": "MINI Living | Preview: Designing for Urban Living",
    "description": "Preview the design considerations that went into the MINI Living Installation at this year's Salone del Mobile. Watch the complete interview: Designing for Urban ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/W663jtWQd1E/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "yZDdh_SccAo"
   },
   "snippet": {
    "title": "MINI Living | Designing for Urban Living",
    "description": "One person's life does not have to be confined to their private space. It can be shared with other people.” ON design CEO Osamu Nishida explores the value of ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/yZDdh_SccAo/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "nm7ObF58lFg"
   },
   "snippet": {
    "title": "MINI Living | Architecture for Urban Living",
    "description": "What is private? What is public? Often it's the semi-public space is neglected.” Arup Project Director Dr. –Ing. Jan Wurm considers the architectural challenges ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/nm7ObF58lFg/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "KQl_66PoMzo"
   },
   "snippet": {
    "title": "MINI Living | Preview: Origins",
    "description": "Preview the vision behind the MINI Living Installation, a vision of shared space for this year's Salone del Mobile. Watch the complete interview: Origins: ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/KQl_66PoMzo/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "Ec9FmoMFkiU"
   },
   "snippet": {
    "title": "MINI Living | A Vision for Shared Living",
    "description": "World-class design, innovation and creativity. At this year's Salone del Mobile, MINI reveals a vision for shared living that respects the sanctity of personal space.",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/Ec9FmoMFkiU/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "jpyoKBEqGpk"
   },
   "snippet": {
    "title": "The MINI Living Installation at Salone del Mobile",
    "description": "From Yokohama, London and Berlin, meet the visionaries behind MINI Living: a conceptual installation revealed at the 55th Salone del Mobile. Enter the world ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/jpyoKBEqGpk/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "snippet": {
    "title": "MINI Living",
    "description": "",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/Ec9FmoMFkiU/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "Z0yIUcqJKgA"
   },
   "snippet": {
    "title": "The MINI Clubman | LED Ring",
    "description": "Using MINI Connected technology, the LED Ring is a unique lighting experience providing travel information at your fingertips. Elegant design | Innovative ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/Z0yIUcqJKgA/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "WvS9GDnwe0g"
   },
   "snippet": {
    "title": "The MINI Clubman | ALL4 All-Wheel Drive",
    "description": "With sportier handling and improved versatility, the MINI Clubman's unique ALL4 all-wheel drive offers everyday practicality in changing conditions. Elegant ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/WvS9GDnwe0g/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "fAj3M8RXZhw"
   },
   "snippet": {
    "title": "MINI Connected | GoPro",
    "description": "See more with the MINI Connected GoPro feature and control your GoPro from the cockpit. Preview footage, optimise filming and more with your MINI Connected ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/fAj3M8RXZhw/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "u--DVeVWjRw"
   },
   "snippet": {
    "title": "MINI Connected | Sports Instruments & Forcemeter",
    "description": "Take that famous MINI go-kart feeling to the next level with the MINI Connected Sports Instruments and Forcemeter. Control the adrenaline while driving and ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/u--DVeVWjRw/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "Ed6XzFZ3Sm4"
   },
   "snippet": {
    "title": "MINI Connected | Online Search",
    "description": "Stay informed on every expedition. Access traffic predictions, journey duration, fuel consumption, destination addresses and more at the touch of a button with ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/Ed6XzFZ3Sm4/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "fmAVfrlJWkA"
   },
   "snippet": {
    "title": "MINI Connected | XL Journey Mate",
    "description": "A route planner, travel guide and real-time traffic assistant in one, the MINI Connected XL Journey Mate is the perfect companion for every expedition. [MINI 3 ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/fmAVfrlJWkA/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "UONGu8h0RQ8"
   },
   "snippet": {
    "title": "The New MINI Convertible | Explore The Features.",
    "description": "A quieter electrical roof, plenty of space in the boot and inventive technology like a Rain Warner feature — the new 4-seat MINI Convertible has all the makings ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/UONGu8h0RQ8/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "J1oIEwOYq-Q"
   },
   "snippet": {
    "title": "This Day Forward | The New MINI Convertible.",
    "description": "Stay Open. When you reach a crossroads, do you play it safe or take a risk? Faced with certain security or embracing the unknown, Jake wrestles with that ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/J1oIEwOYq-Q/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "YMS408VWzCs"
   },
   "snippet": {
    "title": "The New MINI Convertible | Easy Load Boot.",
    "description": "Because sometimes the escape can't wait. Easy Load functionality in the spacious boot of the new MINI Convertible gets you out of the carpark and onto sunny ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/YMS408VWzCs/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "8w0wIg_70hc"
   },
   "snippet": {
    "title": "The New MINI Convertible | Electrical Roof.",
    "description": "Enjoy every sunny joy ride, your way. The electrical roof.of the new MINI Convertible does its part to make sure every cruise is one to remember. Watch a short ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/8w0wIg_70hc/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "SMKl7S-N_YA"
   },
   "snippet": {
    "title": "The New MINI Convertible | Rain Warner App.",
    "description": "Designed to dodge rain drops. Rain Warner technology is integrated into the new MINI Convertible to give you a heads up to put the top down before the next ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/SMKl7S-N_YA/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "LtXQHmhLmT4"
   },
   "snippet": {
    "title": "The New MINI Convertible | Design.",
    "description": "Every corner of the new MINI Convertible is designed to inspire. Round every sunny turn, its character shines as much as the rays it soaks in. Watch a short film ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/LtXQHmhLmT4/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "kO5O8bNPd6c"
   },
   "snippet": {
    "title": "This Day Forward (Trailer) | The New MINI Convertible.",
    "description": "Stay Open. When you reach a crossroads, do you play it safe or take a risk? Faced with certain security or embracing the unknown, Jake wrestles with that ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/kO5O8bNPd6c/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "cYCICfv-Z-I"
   },
   "snippet": {
    "title": "The MINI Clubman | Easy Opener",
    "description": "Accessing 360L of the new MINI Clubman's spacious boot becomes even more effortless with add on intuitive technology like the Easy Opener for contactless ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/cYCICfv-Z-I/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "B818QQ1Z_Gs"
   },
   "snippet": {
    "title": "The MINI Clubman | Innovative Technology",
    "description": "Style meets practicality in the new MINI Clubman with the finest in innovative technology including a distinctive illuminated Fin Antenna and MINI Logo ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/B818QQ1Z_Gs/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "Gqa-xJICQ04"
   },
   "snippet": {
    "title": "The MINI Clubman | Twin Power Turbo Engines",
    "description": "Travel further than ever before in the new MINI Clubman with MINI Connected technology to take care of the trip planning and fuel efficient Twin Power Turbo ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/Gqa-xJICQ04/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "1RZ9UeFuGNY"
   },
   "snippet": {
    "title": "The MINI Clubman | The Only MINI With 6 Doors",
    "description": "The only MINI with 6 doors, the new MINI Clubman's efficient use of space has room for the whole family and more. Elegant design | Innovative technology ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/1RZ9UeFuGNY/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "Cc8wRYkOGRc"
   },
   "snippet": {
    "title": "The MINI Clubman | Surprisingly Spacious",
    "description": "Elegantly designed to fit all of your passions inside, the new MINI Clubman is surprisingly spacious. Elegant design | Innovative technology | Efficient use of ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/Cc8wRYkOGRc/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "hjLCKSHFDdo"
   },
   "snippet": {
    "title": "Whatever It Takes: Desert Winds at Dakar 2016",
    "description": "As it attempts a 5th straight title at the Dakar Rally, MINI will do whatever it takes while enduring 9000 km of the most demanding terrain of Argentina and Bolivia.",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/hjLCKSHFDdo/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "Mu5qcr0pgPc"
   },
   "snippet": {
    "title": "Whatever It Takes: Digging Out at Dakar 2016",
    "description": "Trouble can wait around any turn at the Dakar Rally and you need to be prepared to get your hands dirty. As it attempts a 5th straight title at the cross-country ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/Mu5qcr0pgPc/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "VFqzvewqqEQ"
   },
   "snippet": {
    "title": "Whatever It Takes: Rugged Terrain at Dakar 2016",
    "description": "There are many hurdles throughout the Dakar Rally. As it attempts a 5th straight title at the Dakar Rally, MINI will do whatever it takes while enduring 9000 km of ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/VFqzvewqqEQ/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "0mGQ0f1Hx6k"
   },
   "snippet": {
    "title": "Whatever It Takes: River Crossings at Dakar 2016",
    "description": "Bridges are scarce in the off-road, cross-country race of the Dakar Rally. As it attempts a 5th straight title at the Dakar Rally, MINI will do whatever it takes while ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/0mGQ0f1Hx6k/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "Ok0CGA4Hy3Y"
   },
   "snippet": {
    "title": "Whatever It Takes: Endless Dunes at Dakar 2016",
    "description": "Sand can stretch to the horizon in every direction at the Dakar Rally. As it attempts a 5th straight title at the cross-country race, MINI will do whatever it takes while ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/Ok0CGA4Hy3Y/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "snippet": {
    "title": "Dezeen + MINI Frontiers",
    "description": "A survey of the pioneering ideas that will shape our future, presented by MINI and Dezeen.",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/i0SxlY1eCY4/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "snippet": {
    "title": "MINI + Vice present: "All The Wrong Places"",
    "description": "Explore some of the most offbeat corners of the world with MINI and VICE.",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/FadDwv-RA00/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "snippet": {
    "title": "MINI Stories",
    "description": "A collection of the stories, people and ideas that inspire us.",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/cOyqXnWVivQ/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "snippet": {
    "title": "Design Insights",
    "description": "Follow our creative process and hear from the designers that craft our cars.",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/ja944Vt3FR8/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "snippet": {
    "title": "Motorsport",
    "description": "Get the latest track reports from the international MINI rally circuit.",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/VFqzvewqqEQ/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "snippet": {
    "title": "MINI Connected",
    "description": "Discover how MINI Connected enhances your drive with the touch of a button.",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/fAj3M8RXZhw/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "snippet": {
    "title": "Favourites",
    "description": "Enjoy the best of MINI on YouTube.",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/ja944Vt3FR8/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "WqDUPLLxBzE"
   },
   "snippet": {
    "title": "The MINI Clubman: Taking To The Street",
    "description": "Follow your instincts and the MINI Clubman on a leisurely cruise through the design capital of Copenhagen. Find out more about our first-ever MINI with 6 doors: ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/WqDUPLLxBzE/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "JJg80RlbDOM"
   },
   "snippet": {
    "title": "The MINI Clubman: From Above",
    "description": "Fly over the new MINI Clubman for a closer look at its distinctive fin antenna and stylish sunroof. Find more unmistakable MINI Clubman features at ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/JJg80RlbDOM/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "rbJIxMpX4Mg"
   },
   "snippet": {
    "title": "The MINI Clubman: Centre Instrument",
    "description": "Sitting at the centre of every MINI dashboard is the MINI Centre Instrument, encircled in luminous LED. With real-time traffic alerts, trip planning from the MINI ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/rbJIxMpX4Mg/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  },
  {
   "id": {
    "videoId": "SNxCCyCtMqU"
   },
   "snippet": {
    "title": "The MINI Clubman: Walk Around",
    "description": "Follow your instinct and circle around the new MINI Clubman's elongated silhouette, ending in practical yet stylish Split Doors. Go With Your Gut and get a look ...",
    "thumbnails": {
     "high": {
      "url": "https://i.ytimg.com/vi/SNxCCyCtMqU/hqdefault.jpg"
     }
    },
    "channelTitle": "MINI"
   }
  }
 ]
}

在文档中,您将找到:

频道的描述 [...] 的最大长度为 1000 个字符。

要获取完整的说明,您必须查询视频 ID 本身:

https://www.googleapis.com/youtube/v3/videos?part=snippet&id={VIDEO_ID}&key={YOUR_API_KEY}

因此,您必须执行以下操作:

$string = file_get_contents("https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCuCQXqQLAQuTObCGlTYDE3w&maxResults=50&order=date&key=API_KEY_HERE&fields=nextPageToken,pageInfo,items(id(videoId),snippet(title,description,channelTitle,thumbnails(high(url))))");
$json_a = json_decode($string, true);
foreach($json_a['items'] as $video){
    $description = file_get_contents("https://www.googleapis.com/youtube/v3/videos?part=snippet&id={$video['id']['videoId']}&key=API_KEY_HERE");
    $description = json_decode($description, true);
    $description = $description['items'][0]['snippet']['description'];
}

您正在发出的搜索请求将始终具有截断的描述。尝试视频请求,它将返回完整的描述。

相关内容

  • 没有找到相关文章

最新更新