Exemplo n.º 1
0
# coding=utf-8
import urllib2
from tendo import singleton
from radio_util import RADIO

me = singleton.SingleInstance()
IPHONE_USER_AGENT = 'AppleCoreMedia/1.0.0.12B435 (iPhone; U; CPU OS 8_1_1 like Mac OS X; ko_kr)'
radio = RADIO('/radio/cbs')
radio.mediaDownLoop('http://101.79.254.171/cbs939/_definst_/cbs939.stream/playlist.m3u8',IPHONE_USER_AGENT)
Exemplo n.º 2
0
# coding=utf-8
import urllib2
import json
from urlparse import urljoin
from tendo import singleton
from radio_util import RADIO

me = singleton.SingleInstance()
IPHONE_USER_AGENT = 'AppleCoreMedia/1.0.0.12B435 (iPhone; U; CPU OS 8_1_1 like Mac OS X; ko_kr)'
radio = RADIO('/radio/happyfm')
req = urllib2.Request('http://kongapi.kbs.co.kr/api/kp_cms/live_stream','beta=0&is_bora=N&device_type=iphone&welcome=1_1985_1_1_0_1&channel_code=22')
req.add_header('User-Agent','Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12B435 mobile/iPhone OS/iPhone/iPhone6,1/8.1.1/KBS kong/1.0.8')
js = json.load(urllib2.urlopen(req))
m3 = radio.getM3U8withUseragent(js['real_service_url'],IPHONE_USER_AGENT)
infoUrl = urljoin(m3.base_uri,m3.data['playlists'][0]['uri'])
radio.mediaDownLoop(None,IPHONE_USER_AGENT,infoUrl = infoUrl)
Exemplo n.º 3
0
# coding=utf-8
import urllib2
from tendo import singleton
from radio_util import RADIO

me = singleton.SingleInstance()
IPHONE_USER_AGENT = 'AppleCoreMedia/1.0.0.12B435 (iPhone; U; CPU OS 8_1_1 like Mac OS X; ko_kr)'
radio = RADIO('/radio/mbcfm4u')
url = radio.urlopenWithUseragent('http://miniplay.imbc.com/AACLiveUrl.ashx?channel=mfm&type=iphone&agent=iphone&protocol=M3U8','iphone')
radio.mediaDownLoop(url,IPHONE_USER_AGENT)
Exemplo n.º 4
0
# coding=utf-8
import urllib2
import re
from tendo import singleton
from Crypto.Cipher import DES
from radio_util import RADIO

me = singleton.SingleInstance()
IPHONE_USER_AGENT = 'AppleCoreMedia/1.0.0.12B435 (iPhone; U; CPU OS 8_1_1 like Mac OS X; ko_kr)'
radio = RADIO('/radio/lovefm')
encdata = radio.urlopenWithUseragent('http://gorealra.sbs.co.kr/g4/protocol/GetStream.jsp?pmDevice=ios&pmNetwork=wifi&pmChannel=RA01&pmAppver=4.5.0&from=iphone','Gorealra/4.5.4 CFNetwork/711.1.16 Darwin/14.0.0')
des = DES.new(KEY[:8], DES.MODE_ECB)
playlistUrl = des.decrypt(encdata.decode('base64'))
playlistUrl = re.sub('[\x01-\x08]','',playlistUrl)
radio.mediaDownLoop(playlistUrl,IPHONE_USER_AGENT)