Skip to content

Instantly share code, notes, and snippets.

View alastair's full-sized avatar

Alastair Porter alastair

View GitHub Profile
import requests
import xspf # https://github.com/alastair/xspf
g = requests.get("https://gist.githubusercontent.com/iainmullan/f40cf1e0e66be62a629f/raw/4b0e2e3b9272e0378586f9a46317d4af850ff21a/pitchfork200.json")
j = g.json()
x = xspf.Xspf()
for t in j:
x.add_track(title=t["title"], creator=t["artist"])
open("pitchfork200.xspf", "w").write(x.toXml())
I maeded u a lolcat
but ur all asskee.
Im in ur snippet, modifyin ur code.