Last active 1497078403

howl.fm playlist downloader. I just don't like paywalls, sorry

Revision 5a9b5390a95a3014a91e5977ddd2cea69fbd9d0d

howl-fm_download.js Raw
1a = document.getElementsByTagName("a");
2out = "";
3for (var i=0;i<a.length;i++) {
4 if (a[i].hasAttribute("data-stream-url")) {
5 out = out + " '" + a[i].getAttribute("data-stream-url") + "'"
6 }
7};
8prompt("urls:", out)
9//then use that with something like wget. you'll get a bunch of long filenames. use the below script to fix the filenames
howl-fm_renamer.py Raw
1#!/usr/bin/env python3
2from glob import glob
3import os
4from urllib.parse import unquote
5for fn in glob("*.mp3?response-content-disposition*"):
6 newfn = unquote(unquote(fn.split("filename=%22")[1].split("%22")[0]))
7 os.rename(fn, newfn)
8 print(newfn)