Friday, September 10th 2010, 10:56am UTC+1
You are not logged in.
Dear visitor, welcome to Linux VDR/DVB форум. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
|
|
Source code |
1 2 3 4 5 6 7 |
#EXTM3U #EXTINF:-1,Disco Of The 80's - 101.RU NBN http://89.20.132.26:8000/c7_3 #EXTINF:-1,Disco Of The 80's - 101.RU MX http://94.103.92.245:8000/c7_3 #EXTINF:-1,Disco Of The 80's - 101.RU ....... http://94.23.194.126:8000/c7_3 |
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
#!/usr/bin/env python
import urllib
import sys
import os
import re
## change me ######
outdir = "/video/audio/radio/"
tmpdir = "/tmp/vtn/"
###################
url = "http://74.86.56.147/vtunerapp/vtuner4vf/asp/appupdate/updateflush.asp?Flush=No"
name={}
stream={}
coder={}
location={}
music={}
# merwuerdigen Zeichensatz der URLs korrigieren
def substChar(e):
tab1=['o','p','q','r','s','t','u','v','w','x','y','z','a','b','c','d','e','f','g','h','i','j','k','l','m','n']
tab2=['O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N']
s=""
for j in e:
if j in tab1:
s+=tab1[ord(j)-ord('a')]
elif j in tab2:
s+=tab2[ord(j)-ord('A')]
elif j=='!':
s+='0'
elif j=='@':
s+='1'
elif j=='#':
s+='2'
elif j=='$':
s+='3'
elif j=='%':
s+='4'
elif j=='^':
s+='5'
elif j=='&':
s+='6'
elif j=='*':
s+='7'
elif j=='(':
s+='8'
elif j==')':
s+='9'
elif j=='<':
s+=':'
elif j=='>':
s+='='
elif j=='6':
s+='&'
else:
s+=j;
return s
def createpls(basedir, datafile, idx1, idx2):
f=open(datafile,"r")
entry = f.readlines()
f.close()
fw=0
fileName=""
for i in entry:
elements = i.split('\t')
for id in elements[idx2].rstrip().split(' '):
try:
# nur MP3-Streams fuer das MP3-Plugin
if coder[id].split(' ')[0]=="MP3":
path = basedir + "/" + elements[idx1] + "/" # + location[id] + "/"
fname = re.sub("/","_", name[id] + " (" + music[id]) + ").pls"
try:
os.makedirs(path)
except:
pass
f=open(path + fname, "w")
f.write(stream[id])
f.write("\n")
f.close()
print path + name[id]
except:
print "illegal id:", id
pass
# step 1: senderdatei holen und nach tmp
try:
os.makedirs(outdir)
except:
pass
try:
os.makedirs(tmpdir)
except:
pass
try:
f=open(tmpdir + "stations","r")
entry = f.readlines()
f.close()
print "found stations"
except:
print "get ", url
data = urllib.urlopen(url)
entry = data.read()
data.close()
f=open(tmpdir + "stations","w")
f.write(entry)
f.close()
f=open(tmpdir + "stations","r")
entry = f.readlines()
f.close()
print "found stations"
# step 2: Senderdatei zerlegen und auch nach tmpdir, es entstehen
# diverse vtn-Files
print "parsing..."
fw=0
fileName=""
os.mkdir
for i in entry:
elements = i.split("::")
if elements[0]=="file" and len(elements)==2:
if (fw):
fw.close()
fileName = elements[1].rstrip()
fw = open (tmpdir + fileName,"w")
continue
mark = i.split(":")
if mark[0] == (fileName + " - start"):
continue
if mark[0] == (fileName + " - end"):
continue
if (fw!=0):
if (fileName == "station.vtn"):
elements = i.split("\t")
n=0
i=""
for e in elements:
if n==5 or n==6 or n==8:
i += substChar(e)
else:
i += e
n=n+1
if n<len(elements):
i+='\t'
fw.write(i)
elements = i.split('\t')
if len(elements)<6:
continue
name[elements[0]] = elements[1]
location[elements[0]] = elements[2]
music[elements[0]] = elements[3]
coder[elements[0]] = elements[4]
str = elements[6]
s=str.split('&')[0]
if s[0]=='m':
s = s[1:]
for part in str.split('&'):
subpart = part.split('=')
if subpart[0]=="link":
s = subpart[1]
stream[elements[0]] = s
if (fw):
fw.close()
# step 3: senderdatei in pls-Files zerlegen
createpls(outdir + "laender/afrika", tmpdir + "africa.vtn",2, 4)
createpls(outdir + "laender/europa", tmpdir + "europe.vtn",2, 4)
createpls(outdir + "laender/internet", tmpdir + "internet.vtn",2, 4)
createpls(outdir + "laender/ocean" , tmpdir + "ocean.vtn",2, 4)
createpls(outdir + "laender/mittelamerika", tmpdir + "centrala.vtn",2, 4)
createpls(outdir + "laender/mitost", tmpdir + "middle.vtn",2, 4)
createpls(outdir + "laender/nordamerika", tmpdir + "northa.vtn",2, 4)
createpls(outdir + "laender/suedamerika", tmpdir + "southa.vtn",2, 4)
createpls(outdir + "musik", tmpdir + "music.vtn",2, 4)
createpls(outdir + "sprache", tmpdir + "talk.vtn",2, 4)
createpls(outdir + "fun", tmpdir + "fun.vtn",0, 1)
|
This post has been edited 1 times, last edit by "Goga777" (Nov 15th 2009, 6:46pm)
Beginner
Здесь в чате Bikalexander дал ссылку с немецкого форума на Python-Script который создоёт pls-Files для более 7000 интернетрадио
This post has been edited 1 times, last edit by "Goga777" (Nov 15th 2009, 8:38pm)
Users that thanked:
Andrej (11.01.2010), Bikalexander (17.11.2009), Dim0n (22.11.2009), Goga777 (17.11.2009)
Quoted
mmv "*.pls" "*#1.strm"
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 |
[playlist] NumberOfEntries=3 File1=http://72.26.216.106:80/vocaltrance_hi?xxxxxxxxxxx Title1=Vocal Trance Length1=-1 File2=http://72.26.204.32:80/vocaltrance_hi?xxxxxxxxxxx Title2=Vocal Trance Length2=-1 File3=http://72.26.204.18:80/vocaltrance_hi?xxxxxxxxxxx Title3=Vocal Trance Length3=-1 Version=2 |
This post has been edited 1 times, last edit by "Goga777" (Jan 10th 2010, 2:08pm)
Сгруппировал по темам ,добавлено несколько плей листов ,объединил
каталоги от Алекса и мой ,тем самым есть рабочая версия "RADIO.RU"
Установка:
1.Распаковываем ахив "RADIO.RU" в удобном для вас месте на жёстком диске.
2.Включаем "XBMC"
3.Дальше по ходу: Музыка----Добавить источник---Просмотр-----Домашняя
папка---"RADIO.RU"---ОК----возвращаемся в
--Музыка---находим--"RADIO.RU"---находим понравившуюся Вам
тему---исполнителя или радио ждём пока загрузится буфер и слушаем !!!
по моему понятно описал.....
Да !! Не забудьте подключить интернет
Всё!!
Можно, но не разумно. Список категорий и перечень извлекается из одной страницы.А нельзя как нибудь по генре разбить
Интересная ссылка. Из http://guzei.com/online_radio/list/ можно извлечь много полезного.
Quoted
Вот здесь можно тоже кое что взять http://guzei.com/onlin