Skip to content

Instantly share code, notes, and snippets.

View strayer's full-sized avatar
🇺🇦
🕊

Sven Grunewaldt strayer

🇺🇦
🕊
View GitHub Profile
@strayer
strayer / youtube-dl-dash.bash
Last active March 24, 2021 18:00
youtube-dl wrapper script to download DASH Video and Audio and combine it with ffmpeg with automatic best format detection and fallback to default youtube-dl behaviour for videos without DASH
#!/usr/bin/env bash
set -e
YOUTUBE_FORMATS=$(youtube-dl -F "$1")
if [[ "$YOUTUBE_FORMATS" == *"(DASH Video)"* ]]; then
VIDEO_NAME=$(youtube-dl --get-filename "$1")
VIDEO_NAME_TMP="$VIDEO_NAME.tmp"
echo "Filename: $VIDEO_NAME"
@strayer
strayer / youtube-playlist-links.py
Last active December 29, 2015 06:09
Lists video page links of a YouTube playlist
@strayer
strayer / fritzbox_get_external_ip.py
Created October 28, 2013 15:27
Command line script for retrieving the current external IP via the FritzBox UPnP API (requirements: requests, lxml)
#!/usr/bin/env python3
import requests
import sys
from lxml import etree
from io import StringIO
if len(sys.argv) < 2 or sys.argv[1] == "-h" or sys.argv[1] == "--help":
print("Usage: {} <fritzbox hostname>".format(__file__))
sys.exit(0)