Skip to content

Instantly share code, notes, and snippets.

@chwnam
Created October 2, 2015 01:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chwnam/c48626a9082326950858 to your computer and use it in GitHub Desktop.
Save chwnam/c48626a9082326950858 to your computer and use it in GitHub Desktop.
iMBC FM4U 스트림 주소를 알아내는 파이썬 스크립트
#!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib2, json, re
print json.loads(re.match(r'\((.+)\);', urllib2.urlopen('http://miniplay.imbc.com/WebLiveURL.ashx?channel=mfm&protocol=RTMP').read(), re.M|re.S).group(1))['AACLiveURL']
@chwnam
Copy link
Author

chwnam commented Oct 2, 2015

여기에 다음 쉘 스크립트를 같이 적용:

# imbc.sh
#!/bin/bash
mplayer "`imbc_rtmp.py`" > /dev/null 2>&1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment