Skip to content

Instantly share code, notes, and snippets.

View brkydnc's full-sized avatar
🦀

Berkay Dinç brkydnc

🦀
View GitHub Profile
import { DOMParser } from "https://deno.land/x/deno_dom/deno-dom-wasm.ts";
const capitalize = str => str.charAt(0).toLocaleUpperCase("tr-TR") + str.slice(1).toLocaleLowerCase("tr-TR");
const parser = new DOMParser();
const fetchDocument = path => fetch("https://www.nufusune.com/" + path)
.then(response => response.text())
.then(text => parser.parseFromString(text, "text/html"));
const indexOfDistricts = await fetchDocument("ilceler");
@brkydnc
brkydnc / download.sh
Last active May 17, 2022 14:19
Extract audios of the videos in a given playlist using yt-dlp and GNU parallel.
#!/bin/bash
function print_help_message() {
echo "Extracts audios from the videos in a given playlist using yt-dlp and GNU parallel"
echo
echo "USAGE: ${0} [options] <playlist_id>"
echo
echo "OPTIONS:"
echo "-h, --help Print this message."
echo "-o, --output DIR Download videos to DIR"