Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
Programming

Journal Journal: Edna python script

This is my best working, and most useful application ever! It's code is in pure python, and it only use's the urllib module Here is the code: import os import urllib def write(): s=open("test.m3u", "w") s.write(f.read()) s.close() def write2(): fil = line.split('/')[-1] fil = fil[:-1] fil = fil.replace("%20", " ") k = urllib.urlopen(line) s2=open(fil, "w") print "laster ned " + fil s2.write(k.read()) s2.close() n = raw_input("Hva er linken?") f = urllib.urlopen(n) n = n.split('/')[-1] write() file = open("test.m3u") while 1: line = file.readline() fila = line if not line: break write2() can't remember why i put import os there in the first place :) For the code to work properly in windows, you must change the opening mode of the files you want to write the mp3 to, from "w" too "wb". edit: forgot to say what it does. you give the program a link to a mp3-playlist file, an edna-database for example. And it downloads every file.
User Journal

Journal Journal: Bibelbot and other bots

I've kind of given up my bibelbot, it's working but i can't get it more user-friendly and it have a little bug. However my other botproject, works well now. not case-sensitive anymore, it functions well as a bibelbot.
User Journal

Journal Journal: Bibelbot

My ircbot is slowly failing now. i suddently saw that it stopped after reciving one vers, i cant figure out why, maybe it is just linux fooling with me :)
User Journal

Journal Journal: my journal

had to test, i posted for the first time today.

Slashdot Top Deals

Riches: A gift from Heaven signifying, "This is my beloved son, in whom I am well pleased." -- John D. Rockefeller, (slander by Ambrose Bierce)

Working...