YouTube API过滤器发布后不起作用

时间:2019-03-21 17:50:58

标签: youtube-api youtube-data-api

这个非常基本的查询以错误的结果响应:

https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=10&publishedAfter=2019-01-01T00:00:00Z&key={MY_KEY}

结果集包含2019-01-01T00:00:00Z字段中publishedAt之前的项目。我的应用程序完全损坏,因为它依赖于此过滤器。我在2019年3月16日之后面临问题。这是查询结果:

{
 "kind": "youtube#searchListResponse",
 "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/WppcKwINdbdkHMpSM_vz32bjgA4\"",
 "nextPageToken": "CAoQAA",
 "regionCode": "DE",
 "pageInfo": {
  "totalResults": 1000000,
  "resultsPerPage": 10
 },
 "items": [
  {
   "kind": "youtube#searchResult",
   "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/0LG4Jg0EV14c5UiMLdaaet_v2CM\"",
   "id": {
    "kind": "youtube#video",
    "videoId": "UOxkGD8qRB4"
   },
   "snippet": {
    "publishedAt": "2018-11-03T07:30:00.000Z",
    "channelId": "UC2t5bjwHdUX4vM2g8TRDq5g",
    "title": "K/DA - POP/STARS (ft Madison Beer, (G)I-DLE, Jaira Burns) | Official Music Video - League of Legends",
    "description": "K/DA Ahri, K/DA Evelynn, K/DA Kai'Sa, and K/DA Akali take the world stage with their debut single. Keep the show going on the Rift with these new Epic skins.",
    "thumbnails": {
     "default": {
      "url": "https://i.ytimg.com/vi/UOxkGD8qRB4/default.jpg",
      "width": 120,
      "height": 90
     },
     "medium": {
      "url": "https://i.ytimg.com/vi/UOxkGD8qRB4/mqdefault.jpg",
      "width": 320,
      "height": 180
     },
     "high": {
      "url": "https://i.ytimg.com/vi/UOxkGD8qRB4/hqdefault.jpg",
      "width": 480,
      "height": 360
     }
    },
    "channelTitle": "League of Legends",
    "liveBroadcastContent": "none"
   }
  },
  {
   "kind": "youtube#searchResult",
   "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/pqPk68pyu4UN0ALIfeVVFhIvYQo\"",
   "id": {
    "kind": "youtube#video",
    "videoId": "m7Bc3pLyij0"
   },
   "snippet": {
    "publishedAt": "2018-09-24T13:58:16.000Z",
    "channelId": "UCEdvpU2pFRCVqU6yIPyTpMQ",
    "title": "Marshmello ft. Bastille - Happier (Official Music Video)",
    "description": "Marshmello ft. Bastille - Happier (Official Music Video) Download / Stream Happier ▷ http://marshmello.lnk.to/happier NEW Mello™   by Marshmello gear SHOP ...",
    "thumbnails": {
     "default": {
      "url": "https://i.ytimg.com/vi/m7Bc3pLyij0/default.jpg",
      "width": 120,
      "height": 90
     },
     "medium": {
      "url": "https://i.ytimg.com/vi/m7Bc3pLyij0/mqdefault.jpg",
      "width": 320,
      "height": 180
     },
     "high": {
      "url": "https://i.ytimg.com/vi/m7Bc3pLyij0/hqdefault.jpg",
      "width": 480,
      "height": 360
     }
    },
    "channelTitle": "Marshmello",
    "liveBroadcastContent": "none"
   }
  },
  {
   "kind": "youtube#searchResult",
   "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/JHrxdxyihn5FHm1sbVQJxmw3cJY\"",
   "id": {
    "kind": "youtube#video",
    "videoId": "56WBK4ZK_cw"
   },
   "snippet": {
    "publishedAt": "2018-07-12T18:56:15.000Z",
    "channelId": "UCqrBKQHQVEvD2Q9FP0DCP2g",
    "title": "benny blanco, Halsey & Khalid – Eastside (official video)",
    "description": "\"Eastside\" out now: http://smarturl.it/EastsideBB Directed by Jake Schreier Executive Producers: Jackie Kelman Bisbee, Alex Fisch Line Producer: Molly Gale ...",
    "thumbnails": {
     "default": {
      "url": "https://i.ytimg.com/vi/56WBK4ZK_cw/default.jpg",
      "width": 120,
      "height": 90
     },
     "medium": {
      "url": "https://i.ytimg.com/vi/56WBK4ZK_cw/mqdefault.jpg",
      "width": 320,
      "height": 180
     },
     "high": {
      "url": "https://i.ytimg.com/vi/56WBK4ZK_cw/hqdefault.jpg",
      "width": 480,
      "height": 360
     }
    },
    "channelTitle": "benny blanco",
    "liveBroadcastContent": "none"
   }
  },
  {
   "kind": "youtube#searchResult",
   "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/Cic0wO6Ki7l3BEeb2kx0VZtOQeA\"",
   "id": {
    "kind": "youtube#video",
    "videoId": "hHW1oY26kxQ"
   },
   "snippet": {
    "publishedAt": "2018-08-22T19:51:06.000Z",
    "channelId": "UCSJ4gkVC6NrvII8umztf0Ow",
    "title": "lofi hip hop radio - beats to relax/study to",
    "description": "Thank you for listening, I hope you will have a good time here :) New merch available! → Listen to the sleepy lofi hip hop radio ...",
    "thumbnails": {
     "default": {
      "url": "https://i.ytimg.com/vi/hHW1oY26kxQ/default_live.jpg",
      "width": 120,
      "height": 90
     },
     "medium": {
      "url": "https://i.ytimg.com/vi/hHW1oY26kxQ/mqdefault_live.jpg",
      "width": 320,
      "height": 180
     },
     "high": {
      "url": "https://i.ytimg.com/vi/hHW1oY26kxQ/hqdefault_live.jpg",
      "width": 480,
      "height": 360
     }
    },
    "channelTitle": "ChilledCow",
    "liveBroadcastContent": "live"
   }
  },
  {
   "kind": "youtube#searchResult",
   "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/l7d6Ky2ZMBiEckdYawqigvqGv4w\"",
   "id": {
    "kind": "youtube#video",
    "videoId": "TcMBFSGVi1c"
   },
   "snippet": {
    "publishedAt": "2019-03-14T12:05:18.000Z",
    "channelId": "UCvC4D8onUfXzvjTOM-dBfEA",
    "title": "Marvel Studios' Avengers: Endgame - Official Trailer",
    "description": "Whatever it takes. Watch the brand-new trailer for Marvel Studios' Avengers: Endgame. In theaters April 26. ▻ Learn more: ...",
    "thumbnails": {
     "default": {
      "url": "https://i.ytimg.com/vi/TcMBFSGVi1c/default.jpg",
      "width": 120,
      "height": 90
     },
     "medium": {
      "url": "https://i.ytimg.com/vi/TcMBFSGVi1c/mqdefault.jpg",
      "width": 320,
      "height": 180
     },
     "high": {
      "url": "https://i.ytimg.com/vi/TcMBFSGVi1c/hqdefault.jpg",
      "width": 480,
      "height": 360
     }
    },
    "channelTitle": "Marvel Entertainment",
    "liveBroadcastContent": "none"
   }
  },
  {
   "kind": "youtube#searchResult",
   "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/id3uz64VI_Frb6lxlzAYDG8yCuw\"",
   "id": {
    "kind": "youtube#video",
    "videoId": "A2FsgKoGD04"
   },
   "snippet": {
    "publishedAt": "2017-05-25T21:58:58.000Z",
    "channelId": "UCRijo3ddMTht_IHyNSNXpNQ",
    "title": "Real Life Trick Shots | Dude Perfect",
    "description": "Trick shots should be an everyday thing! Thanks to Kingsford for sponsoring this video! ▻ Click HERE to subscribe to Dude Perfect! ...",
    "thumbnails": {
     "default": {
      "url": "https://i.ytimg.com/vi/A2FsgKoGD04/default.jpg",
      "width": 120,
      "height": 90
     },
     "medium": {
      "url": "https://i.ytimg.com/vi/A2FsgKoGD04/mqdefault.jpg",
      "width": 320,
      "height": 180
     },
     "high": {
      "url": "https://i.ytimg.com/vi/A2FsgKoGD04/hqdefault.jpg",
      "width": 480,
      "height": 360
     }
    },
    "channelTitle": "Dude Perfect",
    "liveBroadcastContent": "none"
   }
  },
  {
   "kind": "youtube#searchResult",
   "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/1szGxIC2JpHOZayLDDyWY1wRMRg\"",
   "id": {
    "kind": "youtube#video",
    "videoId": "VRJmcxCrAOA"
   },
   "snippet": {
    "publishedAt": "2018-01-22T22:55:24.000Z",
    "channelId": "UCRijo3ddMTht_IHyNSNXpNQ",
    "title": "Real Life Trick Shots 2 | Dude Perfect",
    "description": "Trick shots should be an everyday thing! Thanks to Kay Jewelers for sponsoring this video! Win Valentine's Day by going to http://dudeperfect.com/KayJewelers ...",
    "thumbnails": {
     "default": {
      "url": "https://i.ytimg.com/vi/VRJmcxCrAOA/default.jpg",
      "width": 120,
      "height": 90
     },
     "medium": {
      "url": "https://i.ytimg.com/vi/VRJmcxCrAOA/mqdefault.jpg",
      "width": 320,
      "height": 180
     },
     "high": {
      "url": "https://i.ytimg.com/vi/VRJmcxCrAOA/hqdefault.jpg",
      "width": 480,
      "height": 360
     }
    },
    "channelTitle": "Dude Perfect",
    "liveBroadcastContent": "none"
   }
  },
  {
   "kind": "youtube#searchResult",
   "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/KijOZnDfYz96dVXIA2q3FHlMi_E\"",
   "id": {
    "kind": "youtube#video",
    "videoId": "WXBHCQYxwr0"
   },
   "snippet": {
    "publishedAt": "2018-08-27T16:26:25.000Z",
    "channelId": "UCOwgc8DswjoBMuuUU2ScPvQ",
    "title": "Ava Max - Sweet but Psycho [Official Music Video]",
    "description": "\"Sweet but Psycho\" Available Now Download/Stream: https://avamax.lnk.to/SweetButPsychoID Subscribe for more official content from Ava Max: ...",
    "thumbnails": {
     "default": {
      "url": "https://i.ytimg.com/vi/WXBHCQYxwr0/default.jpg",
      "width": 120,
      "height": 90
     },
     "medium": {
      "url": "https://i.ytimg.com/vi/WXBHCQYxwr0/mqdefault.jpg",
      "width": 320,
      "height": 180
     },
     "high": {
      "url": "https://i.ytimg.com/vi/WXBHCQYxwr0/hqdefault.jpg",
      "width": 480,
      "height": 360
     }
    },
    "channelTitle": "Ava Max",
    "liveBroadcastContent": "none"
   }
  },
  {
   "kind": "youtube#searchResult",
   "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/0O05twjfC6noThM59R5cemOe1pE\"",
   "id": {
    "kind": "youtube#video",
    "videoId": "hA6hldpSTF8"
   },
   "snippet": {
    "publishedAt": "2018-12-07T13:01:21.000Z",
    "channelId": "UCvC4D8onUfXzvjTOM-dBfEA",
    "title": "Marvel Studios' Avengers - Official Trailer",
    "description": "Part of the journey is the end. ▻ Subscribe to Marvel: --- Follow Marvel on Twitter: ...",
    "thumbnails": {
     "default": {
      "url": "https://i.ytimg.com/vi/hA6hldpSTF8/default.jpg",
      "width": 120,
      "height": 90
     },
     "medium": {
      "url": "https://i.ytimg.com/vi/hA6hldpSTF8/mqdefault.jpg",
      "width": 320,
      "height": 180
     },
     "high": {
      "url": "https://i.ytimg.com/vi/hA6hldpSTF8/hqdefault.jpg",
      "width": 480,
      "height": 360
     }
    },
    "channelTitle": "Marvel Entertainment",
    "liveBroadcastContent": "none"
   }
  },
  {
   "kind": "youtube#searchResult",
   "etag": "\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/_60iD_MRSuskBGiBD0PfKUvmK64\"",
   "id": {
    "kind": "youtube#video",
    "videoId": "rlR4PJn8b8I"
   },
   "snippet": {
    "publishedAt": "2019-03-05T16:00:06.000Z",
    "channelId": "UCQzdMyuz0Lf4zo4uGcEujFw",
    "title": "Game of Thrones | Season 8 | Official Trailer (HBO)",
    "description": "The trailer is here. #GameofThrones The Final Season begins April 14 on HBO.",
    "thumbnails": {
     "default": {
      "url": "https://i.ytimg.com/vi/rlR4PJn8b8I/default.jpg",
      "width": 120,
      "height": 90
     },
     "medium": {
      "url": "https://i.ytimg.com/vi/rlR4PJn8b8I/mqdefault.jpg",
      "width": 320,
      "height": 180
     },
     "high": {
      "url": "https://i.ytimg.com/vi/rlR4PJn8b8I/hqdefault.jpg",
      "width": 480,
      "height": 360
     }
    },
    "channelTitle": "GameofThrones",
    "liveBroadcastContent": "none"
   }
  }
 ]
}

0 个答案:

没有答案