From f1be7ca87e96f25b12898926e8c3aa190f47e636 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Sat, 11 Feb 2023 16:18:27 -0600 Subject: [PATCH] Lock YouTube API data for now --- helpers/api/youtube/build.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/helpers/api/youtube/build.js b/helpers/api/youtube/build.js index 0ef5f76..56a3a10 100644 --- a/helpers/api/youtube/build.js +++ b/helpers/api/youtube/build.js @@ -1,5 +1,6 @@ import fs from 'fs-extra' import { google } from 'googleapis' +import axios from 'axios' import { playlists, benchmarksPlaylistId } from './playlists.js' @@ -161,10 +162,12 @@ async function getYouTubeVideos ( options = {} ) { export async function saveYouTubeVideos () { - // - const youtubeVideos = await getYouTubeVideos() + // const youtubeVideos = await getYouTubeVideos() + + // Locked previously sucessful YouTube API data for now + const youtubeVideos = await axios( process.env.VIDEO_SOURCE ) + .then( response => response.data ) - // // Save to JSON await fs.outputJson( youtubeVideoPath, youtubeVideos )