Skip to content

Instantly share code, notes, and snippets.

View dytroc's full-sized avatar
🏫
UIUC Class of 2030

Dytro (다이츠로) dytroc

🏫
UIUC Class of 2030
View GitHub Profile
// Base code: https://gist.github.com/aamiaa/7cdd590e3949cd654758bc90bcb4710b
let wpRequire = webpackChunkdiscord_developers.push([[Symbol()], {}, r => r]);
webpackChunkdiscord_developers.pop();
let ApexStore = Object.values(wpRequire.c).find(x => x?.exports?.A?.createOverride).exports.A;
let UserStore = Object.values(wpRequire.c).find(x => x?.exports?.A?.__proto__?.getCurrentUser).exports.A;
let FluxDispatcher = Object.values(wpRequire.c).find(x => x?.exports?.A?.__proto__?.flushWaitQueue).exports.A;
let api = Object.values(wpRequire.c).find(x => x?.exports?.Bo?.get).exports.Bo;
let globalCopy = navigator.userAgent.includes("Firefox") ? navigator.clipboard.writeText.bind(navigator.clipboard) : copy
@dytroc
dytroc / download-thumbnails.js
Created January 19, 2023 12:31
Download all of the thumbnails of all YouTube videos of the selected channel
const axios = require('axios'); // `npm i axios` or `yarn add axios`
const fs = require('fs');
const apiKey = '(API KEY HERE)';
const channelId = '(CHANNEL ID HERE)';
async function getParams(extra) {
return (await axios.get(`https://youtube.googleapis.com/youtube/v3/search?part=snippet&channelId=${channelId}&maxResults=50&order=date&safeSearch=none&type=video&key=${apiKey}${extra}`)).data;
}