Skip to content

Instantly share code, notes, and snippets.

@ivanskodje
ivanskodje / youtube-dl-download-youtube-music-playlists.md
Last active October 27, 2025 16:45
youtube-dl for downloading music from YouTube

Downloading Music Playlists from YouTube

Disclaimer

Use this knowledge at your own risk.

youtube-dl for Windows

youtube-dl will allow you to download entire youtube playlists and store them as MP3s. This will also allow you to download individual MP3s.

@sidneys
sidneys / youtube_format_code_itag_list.md
Created January 20, 2018 11:12
YouTube video stream format codes itags

YouTube video stream format codes

Comprehensive list of YouTube format code itags

itag Code Container Content Resolution Bitrate Range VR / 3D
5 flv audio/video 240p - - -
6 flv audio/video 270p - - -
17 3gp audio/video 144p - - -
18 mp4 audio/video 360p - - -
22 mp4 audio/video 720p - - -
@artbikes
artbikes / yooper.sh
Created December 5, 2017 21:54
Display title of youtube video
#!/bin/bash
curl -s \
--data-urlencode "url=$1" \
--data-urlencode "format=json" \
http://www.youtube.com/oembed |
jq '.title'
@jimmywarting
jimmywarting / readme.md
Last active April 16, 2026 08:45
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@bashkirtsevich
bashkirtsevich / ffplay.c
Created November 23, 2016 10:03
ffplay source code
/*
* Copyright (c) 2003 Fabrice Bellard
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
@geuis
geuis / gist:8b1b2ea57d7f9a9ae22f80d4fbf5b97f
Last active January 10, 2024 16:43
Get Youtube video urls
// Run from the dev tools console of any Youtube video
// Accurate as of July 2, 2020.
//
// Copy and paste this into the dev console in a browser with the desired video loaded.
//
// NOTE: Some Youtube videos do not directly expose the video url in the response.
// This script doesn't currently attempt to handle those. It will work for most other general video types though.
(async () => {
const html = await fetch(window.location.href).then((resp) => resp.text()).then((text) => text);
@midoriiro
midoriiro / bluetooth_switcher.py
Last active September 11, 2021 15:04
Bluetooth switcher in PyQt 5.5
'''
I've installed a new wifi card on my laptop with bluetooth support,
but there is no shortcut in my keyboard to swtich on/off bluetooth.
This script + custom shortcut with your linux DE (or other) work perfectly
'''
from PyQt5.QtCore import QCoreApplication
from PyQt5.QtBluetooth import QBluetoothLocalDevice
if __name__ == '__main__':
@TheZoc
TheZoc / mp3-to-m4r.bat
Created June 25, 2015 02:51
Convert a MP3 file to an Apple iPhone's ringtone file (M4R), using FFMPEG.
@echo off
rem =====================================================
rem Converts a MP3 file to a M4R file using ffmpeg.
rem Usage: Drop a MP3 file at the top of this batch file.
rem =====================================================
set ffmpeg_exe="C:\ffmpeg\ffmpeg-20150619-git-bb3703a-win64-static\bin\ffmpeg.exe"
rem %~f1 = Full File Path, with drive letter
rem %~p1 = Drive Letter
rem %~p1 = Path Only
@syndbg
syndbg / fetch.py
Created July 14, 2014 00:14
A small Python script, that fetches a YouTube playlist's videos titles and writes them to a file playlist.txt in the same directory. Usage? A legal backup against video deletion. You could always find the song if you know the song title before it got removed
import gdata.youtube
import gdata.youtube.service
# Dependencies:
# - Python==2.7
# - gdata==2.0.18
# - google-api-python-client==1.2
@jefftriplett
jefftriplett / tor.py
Last active March 19, 2025 16:34
Python Requests + Tor (Socks5)
"""
setup:
pip install requests
pip install requests[socks]
super helpful:
- http://packetforger.wordpress.com/2013/08/27/pythons-requests-module-with-socks-support-requesocks/
- http://docs.python-requests.org/en/master/user/advanced/#proxies
"""