update 1.2.4 ISCS 함수 수정
This commit is contained in:
		
							parent
							
								
									a8f0ce75f0
								
							
						
					
					
						commit
						0fa73d38cc
					
				@ -1,7 +1,6 @@
 | 
				
			|||||||
# EPG2XML
 | 
					# EPG2XML
 | 
				
			||||||
이 프로그램은 EPG(Electronic Program Guide)를 웹상의 여러 소스에서 가져와서 XML로 출력하는 프로그램으로 python2.7 및 php5.4.45 이상에서 사용 가능하도록 제작되었다.  
 | 
					이 프로그램은 EPG(Electronic Program Guide)를 웹상의 여러 소스에서 가져와서 XML로 출력하는 프로그램으로 python2.7 및 php5.4.45 이상에서 사용 가능하도록 제작되었다.  
 | 
				
			||||||
python3과 php 5.4.45 이하에서는 정상적인 작동을 보장하지 못한다.  
 | 
					python3과 php 5.4.45 이하에서는 정상적인 작동을 보장하지 못한다.  또한 외부의 소스를 분석하여 EPG 정보를 가공하여 보여주는 것이므로 외부 소스 사이트가 변경되거나 삭제되면 문제가 발생할 수 있다.  
 | 
				
			||||||
또한 외부의 소스를 분석하여 EPG 정보를 가공하여 보여주는 것이므로 외부 소스 사이트가 변경되거나 삭제되면 문제가 발생할 수 있다.  
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 개발자 후원하기
 | 
					## 개발자 후원하기
 | 
				
			||||||
https://www.facebook.com/chericface  
 | 
					https://www.facebook.com/chericface  
 | 
				
			||||||
@ -119,6 +118,8 @@ https://github.com/wonipapa/epg2xml/wiki
 | 
				
			|||||||
https://github.com/wonipapa/epg2xml/wiki/FAQ
 | 
					https://github.com/wonipapa/epg2xml/wiki/FAQ
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 변경사항
 | 
					## 변경사항
 | 
				
			||||||
 | 
					### Version 1.2.4
 | 
				
			||||||
 | 
					  - ISCS 함수 수정
 | 
				
			||||||
### Version 1.2.3
 | 
					### Version 1.2.3
 | 
				
			||||||
  - PHP 버전통합
 | 
					  - PHP 버전통합
 | 
				
			||||||
  - PYTHON 버전 html Parser 변수 추가(libxml지원안하는 기기 편의 지원)
 | 
					  - PYTHON 버전 html Parser 변수 추가(libxml지원안하는 기기 편의 지원)
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@
 | 
				
			|||||||
@date_default_timezone_set('Asia/Seoul');
 | 
					@date_default_timezone_set('Asia/Seoul');
 | 
				
			||||||
error_reporting(E_ALL ^ E_NOTICE);
 | 
					error_reporting(E_ALL ^ E_NOTICE);
 | 
				
			||||||
@set_time_limit(0);
 | 
					@set_time_limit(0);
 | 
				
			||||||
define("VERSION", "1.2.3p5");
 | 
					define("VERSION", "1.2.4");
 | 
				
			||||||
$debug = False;
 | 
					$debug = False;
 | 
				
			||||||
$ua = "'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36'";
 | 
					$ua = "'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36'";
 | 
				
			||||||
$timeout = 5;
 | 
					$timeout = 5;
 | 
				
			||||||
@ -968,12 +968,11 @@ function GetEPGFromIscs($ChannelInfo) {
 | 
				
			|||||||
    $epginfo2 = array();
 | 
					    $epginfo2 = array();
 | 
				
			||||||
    foreach(range(1, $GLOBALS['period']) as $k) :
 | 
					    foreach(range(1, $GLOBALS['period']) as $k) :
 | 
				
			||||||
        $istomorrow = False;
 | 
					        $istomorrow = False;
 | 
				
			||||||
        $url = "http://m.iscs.co.kr/sub/02/data.asp";
 | 
					        $url = "https://www.iscs.co.kr/service/sub/ajax_channel_view.asp";
 | 
				
			||||||
        $day = date("Y-m-d", strtotime("+".($k - 1)." days"));
 | 
					        $day = date("Y-m-d", strtotime("+".($k - 1)." days"));
 | 
				
			||||||
        $params = array(
 | 
					        $params = array(
 | 
				
			||||||
            'Exec_Mode' => 'view',
 | 
					            's_idx' => $ServiceId,
 | 
				
			||||||
            'Source_Id' => $ServiceId,
 | 
					            'c_date' => $day
 | 
				
			||||||
            'Ch_Day' => $day
 | 
					 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
        $params = http_build_query($params);
 | 
					        $params = http_build_query($params);
 | 
				
			||||||
        $method = "POST";
 | 
					        $method = "POST";
 | 
				
			||||||
@ -985,12 +984,50 @@ function GetEPGFromIscs($ChannelInfo) {
 | 
				
			|||||||
                try {
 | 
					                try {
 | 
				
			||||||
                    $data = json_decode($response, TRUE);
 | 
					                    $data = json_decode($response, TRUE);
 | 
				
			||||||
                    if(json_last_error() != JSON_ERROR_NONE) throw new Exception(JSON_SYNTAX_ERROR);
 | 
					                    if(json_last_error() != JSON_ERROR_NONE) throw new Exception(JSON_SYNTAX_ERROR);
 | 
				
			||||||
                    if(count($data['total']) == 0) :
 | 
					                    if($data['result'] == 0) :
 | 
				
			||||||
                        if($GLOBALS['debug']) :
 | 
					                        if($GLOBALS['debug']) :
 | 
				
			||||||
                            printError($ChannelName.CHANNEL_ERROR);
 | 
					                            printError($ChannelName.CHANNEL_ERROR);
 | 
				
			||||||
                        endif;
 | 
					                        endif;
 | 
				
			||||||
                    else :
 | 
					                    else :
 | 
				
			||||||
                        $programs = $data['list'];
 | 
					                        $response = $data['html'];
 | 
				
			||||||
 | 
					                        $dom = new DomDocument;
 | 
				
			||||||
 | 
					                        libxml_use_internal_errors(True);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        if($dom->loadHTML('<?xml encoding="utf-8" ?>'.$response)):
 | 
				
			||||||
 | 
					                            $xpath = new DomXPath($dom);
 | 
				
			||||||
 | 
					                            $query = "//tbody/tr";
 | 
				
			||||||
 | 
					                            $rows = $xpath->query($query);
 | 
				
			||||||
 | 
					                            foreach($rows as $row) :
 | 
				
			||||||
 | 
					                                $startTime = $endTime = $programName = $subprogramName = $desc = $actors = $producers = $category = $episode = "";
 | 
				
			||||||
 | 
					                                $rebroadcast = False;
 | 
				
			||||||
 | 
					                                $rating = 0;
 | 
				
			||||||
 | 
					                                $cells = $row->getElementsByTagName('td');
 | 
				
			||||||
 | 
					                                $startTime = $cells->item(0)->nodeValue ?: "";
 | 
				
			||||||
 | 
					                                $startTime = date("YmdHis", strtotime($day." ".$startTime));
 | 
				
			||||||
 | 
					                                $programName = trim($cells->item(1)->nodeValue) ?: "";
 | 
				
			||||||
 | 
					                                $pattern = '/^(.*?)(\(([\d,]+)회\))?(<(.*)>)?(\((재)\))?$/';
 | 
				
			||||||
 | 
					                                preg_match($pattern, $programName, $matches);
 | 
				
			||||||
 | 
					                                if ($matches != NULL) :
 | 
				
			||||||
 | 
					                                    if(isset($matches[1])) $programName = trim($matches[1]) ?: "";
 | 
				
			||||||
 | 
					                                    if(isset($matches[5])) $subprogramName = trim($matches[5]) ?: "";
 | 
				
			||||||
 | 
					                                    if(isset($matches[3])) $episode = $matches[3] ?: "";
 | 
				
			||||||
 | 
					                                    if(isset($matches[7])) $rebroadcast = $matches[7] ? True : False;
 | 
				
			||||||
 | 
					                                endif;
 | 
				
			||||||
 | 
					                                $rating = $cells->item(2)->nodeValue == '전체관람' ? 0 : str_replace("세이상","", $cells->item(2)->nodeValue);
 | 
				
			||||||
 | 
					                                //ChannelId, startTime, programName, subprogramName, desc, actors, producers, category, episode, rebroadcast, rating
 | 
				
			||||||
 | 
					                                $epginfo[] = array($ChannelId, $startTime, $programName, $subprogramName, $desc, $actors, $producers, $category, $episode, $rebroadcast, $rating);
 | 
				
			||||||
 | 
					                                usleep(1000);
 | 
				
			||||||
 | 
					                            endforeach;
 | 
				
			||||||
 | 
					                        else :
 | 
				
			||||||
 | 
					                            if($GLOBALS['debug']) printError($ChannelName.CONTENT_ERROR);
 | 
				
			||||||
 | 
					                        endif;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					                        print_r($programs);
 | 
				
			||||||
                        foreach($programs as $program) :
 | 
					                        foreach($programs as $program) :
 | 
				
			||||||
                            $startTime = $endTime = $programName = $subprogramName = $desc = $actors = $producers = $category = $episode = "";
 | 
					                            $startTime = $endTime = $programName = $subprogramName = $desc = $actors = $producers = $category = $episode = "";
 | 
				
			||||||
                            $rebroadcast = False;
 | 
					                            $rebroadcast = False;
 | 
				
			||||||
@ -1017,6 +1054,7 @@ function GetEPGFromIscs($ChannelInfo) {
 | 
				
			|||||||
                            $epginfo[] = array($ChannelId, $startTime, $programName, $subprogramName, $desc, $actors, $producers, $category, $episode, $rebroadcast, $rating);
 | 
					                            $epginfo[] = array($ChannelId, $startTime, $programName, $subprogramName, $desc, $actors, $producers, $category, $episode, $rebroadcast, $rating);
 | 
				
			||||||
                            usleep(1000);
 | 
					                            usleep(1000);
 | 
				
			||||||
                        endforeach;
 | 
					                        endforeach;
 | 
				
			||||||
 | 
					                        */
 | 
				
			||||||
                    endif;
 | 
					                    endif;
 | 
				
			||||||
                } catch(Exception $e) {
 | 
					                } catch(Exception $e) {
 | 
				
			||||||
                    if($GLOBALS['debug']) printError($e->getMessage());
 | 
					                    if($GLOBALS['debug']) printError($e->getMessage());
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										81
									
								
								epg2xml.py
									
									
									
									
									
								
							
							
						
						
									
										81
									
								
								epg2xml.py
									
									
									
									
									
								
							@ -44,7 +44,7 @@ if not sys.version_info[:2] == (2, 7):
 | 
				
			|||||||
    sys.exit()
 | 
					    sys.exit()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Set variable
 | 
					# Set variable
 | 
				
			||||||
__version__ = '1.2.3p5'
 | 
					__version__ = '1.2.4'
 | 
				
			||||||
debug = False
 | 
					debug = False
 | 
				
			||||||
today = datetime.date.today()
 | 
					today = datetime.date.today()
 | 
				
			||||||
ua = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36', 'accept': '*/*'}
 | 
					ua = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36', 'accept': '*/*'}
 | 
				
			||||||
@ -140,16 +140,22 @@ def getEpg():
 | 
				
			|||||||
            GetEPGFromEveryon(ChannelInfo)
 | 
					            GetEPGFromEveryon(ChannelInfo)
 | 
				
			||||||
        elif ChannelSource == 'OKSUSU':
 | 
					        elif ChannelSource == 'OKSUSU':
 | 
				
			||||||
            GetEPGFromOksusu(ChannelInfo)
 | 
					            GetEPGFromOksusu(ChannelInfo)
 | 
				
			||||||
 | 
					        elif ChannelSource == 'CCS':
 | 
				
			||||||
 | 
					            GetEPGFromCcs(ChannelInfo)
 | 
				
			||||||
 | 
					        elif ChannelSource == 'OLLEH':
 | 
				
			||||||
 | 
					            GetEPGFromOlleh(ChannelInfo)
 | 
				
			||||||
        elif ChannelSource == 'MBC':
 | 
					        elif ChannelSource == 'MBC':
 | 
				
			||||||
            GetEPGFromMbc(ChannelInfo)
 | 
					            GetEPGFromMbcRadio(ChannelInfo)
 | 
				
			||||||
        elif ChannelSource == 'MIL':
 | 
					        elif ChannelSource == 'MIL':
 | 
				
			||||||
            GetEPGFromMil(ChannelInfo)
 | 
					            GetEPGFromMilRadio(ChannelInfo)
 | 
				
			||||||
        elif ChannelSource == 'IFM':
 | 
					        elif ChannelSource == 'IFM':
 | 
				
			||||||
            GetEPGFromIfm(ChannelInfo)
 | 
					            GetEPGFromIfmRadio(ChannelInfo)
 | 
				
			||||||
        elif ChannelSource == 'KBS':
 | 
					        elif ChannelSource == 'KBS':
 | 
				
			||||||
            GetEPGFromKbs(ChannelInfo)
 | 
					            GetEPGFromKbsRadio(ChannelInfo)
 | 
				
			||||||
        elif ChannelSource == 'ARIRANG':
 | 
					        elif ChannelSource == 'ARIRANG':
 | 
				
			||||||
            GetEPGFromArirang(ChannelInfo)
 | 
					            GetEPGFromArirangRadio(ChannelInfo)
 | 
				
			||||||
 | 
					        elif ChannelSource == 'TBS':
 | 
				
			||||||
 | 
					            GetEPGFromTbsRadio(ChannelInfo)
 | 
				
			||||||
    print('</tv>')
 | 
					    print('</tv>')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Get EPG data from epg.co.kr
 | 
					# Get EPG data from epg.co.kr
 | 
				
			||||||
@ -390,7 +396,6 @@ def GetEPGFromSKB(ChannelInfo):
 | 
				
			|||||||
            data = re.sub('<span class="nowon">now on</span>','',data)
 | 
					            data = re.sub('<span class="nowon">now on</span>','',data)
 | 
				
			||||||
            pattern = '<span>(.*)<\/span>'
 | 
					            pattern = '<span>(.*)<\/span>'
 | 
				
			||||||
            data = re.sub(pattern, partial(replacement, tag='span'), data)
 | 
					            data = re.sub(pattern, partial(replacement, tag='span'), data)
 | 
				
			||||||
            #print(data)
 | 
					 | 
				
			||||||
            strainer = SoupStrainer('div', {'id':'dawn'})
 | 
					            strainer = SoupStrainer('div', {'id':'dawn'})
 | 
				
			||||||
            soup = BeautifulSoup(data, htmlparser, parse_only=strainer, from_encoding='utf-8')
 | 
					            soup = BeautifulSoup(data, htmlparser, parse_only=strainer, from_encoding='utf-8')
 | 
				
			||||||
            html =  soup.find_all('li') if soup.find_all('li') else ''
 | 
					            html =  soup.find_all('li') if soup.find_all('li') else ''
 | 
				
			||||||
@ -527,40 +532,38 @@ def GetEPGFromIscs(ChannelInfo):
 | 
				
			|||||||
    ServiceId =  ChannelInfo[3]
 | 
					    ServiceId =  ChannelInfo[3]
 | 
				
			||||||
    epginfo = []
 | 
					    epginfo = []
 | 
				
			||||||
    epginfo2 = []
 | 
					    epginfo2 = []
 | 
				
			||||||
    url='http://m.iscs.co.kr/sub/02/data.asp'
 | 
					    url='https://www.iscs.co.kr/service/sub/ajax_channel_view.asp'
 | 
				
			||||||
    for k in range(period):
 | 
					    for k in range(period):
 | 
				
			||||||
        istomorrow = False
 | 
					        istomorrow = False
 | 
				
			||||||
        day = today + datetime.timedelta(days=k)
 | 
					        day = today + datetime.timedelta(days=k)
 | 
				
			||||||
        params = {'Exec_Mode': 'view', 'Source_Id': ServiceId, 'Ch_Day': day}
 | 
					        params = {'s_idx': ServiceId, 'c_date': day}
 | 
				
			||||||
        response = requests.post(url, data=params, headers=ua, timeout=timeout)
 | 
					        response = requests.post(url, data=params, headers=ua, timeout=timeout)
 | 
				
			||||||
        response.raise_for_status()
 | 
					        response.raise_for_status()
 | 
				
			||||||
        json_data = response.text
 | 
					        json_data = response.text
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            data = json.loads(json_data, encoding='utf-8')
 | 
					            data = json.loads(json_data, encoding='utf-8')
 | 
				
			||||||
            if(data['total'] > 0 ):
 | 
					            if(data['result'] > 0 ):
 | 
				
			||||||
                programs = data['list']
 | 
					                htmls = data['html']
 | 
				
			||||||
                for program in programs:
 | 
					                strainer = SoupStrainer('tbody')
 | 
				
			||||||
 | 
					                soup = BeautifulSoup(htmls, htmlparser, parse_only=strainer)
 | 
				
			||||||
 | 
					                html =  soup.find_all('tr') if soup.find_all('tr') else ''
 | 
				
			||||||
 | 
					                for row in html:
 | 
				
			||||||
                    startTime = endTime = programName = subprogramName = desc = actors = producers = category = episode = ''
 | 
					                    startTime = endTime = programName = subprogramName = desc = actors = producers = category = episode = ''
 | 
				
			||||||
                    rebroadcast = False
 | 
					                    rebroadcast = False
 | 
				
			||||||
                    rating = 0
 | 
					                    rating = 0
 | 
				
			||||||
                    if program['Time'].startswith('1') or program['Time'].startswith('2'):
 | 
					                    startTime = str(day) + ' ' + row.find('td', {'class':'time'}).text
 | 
				
			||||||
                        istomorrow = True
 | 
					 | 
				
			||||||
                    if program['Time'].startswith('0') and istomorrow == True:
 | 
					 | 
				
			||||||
                        startTime = str(day + datetime.timedelta(days=1)) + ' ' + program['Time']
 | 
					 | 
				
			||||||
                    else:
 | 
					 | 
				
			||||||
                        startTime = str(day) + ' ' + program['Time']
 | 
					 | 
				
			||||||
                    startTime = datetime.datetime.strptime(startTime, '%Y-%m-%d %H:%M')
 | 
					                    startTime = datetime.datetime.strptime(startTime, '%Y-%m-%d %H:%M')
 | 
				
			||||||
                    startTime = startTime.strftime('%Y%m%d%H%M%S')
 | 
					                    startTime = startTime.strftime('%Y%m%d%H%M%S')
 | 
				
			||||||
                    pattern = '^(.*?)(?:\(([\d,]+)회\))?(?:\((재)\))?$';
 | 
					                    pattern = '^(.*?)(?:\(([\d,]+)회\))?(?:\((재)\))?$';
 | 
				
			||||||
                    matches = re.match(pattern, program['Pg_Name'].decode('string_escape').strip())
 | 
					                    matches = re.match(pattern, row.find('td', {'class':'name'}).text.strip().encode('utf-8'))
 | 
				
			||||||
                    if not(matches is None) :
 | 
					                    if not(matches is None) :
 | 
				
			||||||
                        programName = matches.group(1) if matches.group(1) else ''
 | 
					                        programName = matches.group(1) if matches.group(1) else ''
 | 
				
			||||||
                        episode = matches.group(2) if matches.group(2) else ''
 | 
					                        episode = matches.group(2) if matches.group(2) else ''
 | 
				
			||||||
                        rebroadcast = True if matches.group(3) else False
 | 
					                        rebroadcast = True if matches.group(3) else False
 | 
				
			||||||
                    if program['Rating'].decode('string_escape').strip() == '모든연령':
 | 
					                    if row.find('span', {'class':'ru5'}).text.strip() == '전체관람':
 | 
				
			||||||
                        rating = 0
 | 
					                        rating = 0
 | 
				
			||||||
                    else:
 | 
					                    else:
 | 
				
			||||||
                        rating = program['Rating'].replace('세이상','')
 | 
					                        rating = row.find('span', {'class':'ru5'}).text.strip().replace('세이상','')
 | 
				
			||||||
                    #ChannelId, startTime, programName, subprogramName, desc, actors, producers, category, episode, rebroadcast, rating
 | 
					                    #ChannelId, startTime, programName, subprogramName, desc, actors, producers, category, episode, rebroadcast, rating
 | 
				
			||||||
                    epginfo.append([ChannelId, startTime, programName, subprogramName, desc, actors, producers, category, episode, rebroadcast, rating])
 | 
					                    epginfo.append([ChannelId, startTime, programName, subprogramName, desc, actors, producers, category, episode, rebroadcast, rating])
 | 
				
			||||||
                    time.sleep(0.001)
 | 
					                    time.sleep(0.001)
 | 
				
			||||||
@ -652,7 +655,7 @@ def GetEPGFromPooq(ChannelInfo):
 | 
				
			|||||||
                        startTime = program['startDate'] + ' ' + program['startTime']
 | 
					                        startTime = program['startDate'] + ' ' + program['startTime']
 | 
				
			||||||
                        startTime = datetime.datetime.strptime(startTime, '%Y-%m-%d %H:%M')
 | 
					                        startTime = datetime.datetime.strptime(startTime, '%Y-%m-%d %H:%M')
 | 
				
			||||||
                        startTime = startTime.strftime('%Y%m%d%H%M%S')
 | 
					                        startTime = startTime.strftime('%Y%m%d%H%M%S')
 | 
				
			||||||
                        programName = program['programTitle'].replace("\r\n", "").encode('utf-8');
 | 
					                        programName = program['programTitle'].replace("\r\n", "").encode('utf-8')
 | 
				
			||||||
                        pattern = '^(.*?)(?:([\d,]+)회)?(?:\((재)\))?$'
 | 
					                        pattern = '^(.*?)(?:([\d,]+)회)?(?:\((재)\))?$'
 | 
				
			||||||
                        matches = re.match(pattern, programName)
 | 
					                        matches = re.match(pattern, programName)
 | 
				
			||||||
                        if not(matches is None) :
 | 
					                        if not(matches is None) :
 | 
				
			||||||
@ -769,7 +772,19 @@ def GetEPGFromOksusu(ChannelInfo):
 | 
				
			|||||||
        if(debug): printError(ChannelName + str(e))
 | 
					        if(debug): printError(ChannelName + str(e))
 | 
				
			||||||
        else: pass
 | 
					        else: pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Get EPG data from MBC
 | 
					#Get EPG data from CCS
 | 
				
			||||||
 | 
					def GetEPGFromCcs(ChannelInfo):
 | 
				
			||||||
 | 
					    pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#Get EPG data from OLLEH
 | 
				
			||||||
 | 
					def GetEPGFromOlleh(ChannelInfo):
 | 
				
			||||||
 | 
					    pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#Get EPG data from DLIVE
 | 
				
			||||||
 | 
					def GetEPGFromDlive(ChannelInfo):
 | 
				
			||||||
 | 
					    pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Get EPG data from MBC Radio
 | 
				
			||||||
def GetEPGFromMbc(ChannelInfo):
 | 
					def GetEPGFromMbc(ChannelInfo):
 | 
				
			||||||
    ChannelId = ChannelInfo[0]
 | 
					    ChannelId = ChannelInfo[0]
 | 
				
			||||||
    ChannelName = ChannelInfo[1]
 | 
					    ChannelName = ChannelInfo[1]
 | 
				
			||||||
@ -811,8 +826,8 @@ def GetEPGFromMbc(ChannelInfo):
 | 
				
			|||||||
            if(debug): printError(ChannelName + str(e))
 | 
					            if(debug): printError(ChannelName + str(e))
 | 
				
			||||||
            else: pass
 | 
					            else: pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Get EPG data from MIL
 | 
					# Get EPG data from MIL Radio
 | 
				
			||||||
def GetEPGFromMil(ChannelInfo):
 | 
					def GetEPGFromMilRadio(ChannelInfo):
 | 
				
			||||||
    ChannelId = ChannelInfo[0]
 | 
					    ChannelId = ChannelInfo[0]
 | 
				
			||||||
    ChannelName = ChannelInfo[1]
 | 
					    ChannelName = ChannelInfo[1]
 | 
				
			||||||
    ServiceId =  ChannelInfo[3]
 | 
					    ServiceId =  ChannelInfo[3]
 | 
				
			||||||
@ -860,8 +875,8 @@ def GetEPGFromMil(ChannelInfo):
 | 
				
			|||||||
            if(debug): printError(ChannelName + str(e))
 | 
					            if(debug): printError(ChannelName + str(e))
 | 
				
			||||||
            else: pass
 | 
					            else: pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Get EPG data from IFM
 | 
					# Get EPG data from IFM Radio
 | 
				
			||||||
def GetEPGFromIfm(ChannelInfo):
 | 
					def GetEPGFromIfmRadio(ChannelInfo):
 | 
				
			||||||
    ChannelId = ChannelInfo[0]
 | 
					    ChannelId = ChannelInfo[0]
 | 
				
			||||||
    ChannelName = ChannelInfo[1]
 | 
					    ChannelName = ChannelInfo[1]
 | 
				
			||||||
    ServiceId =  ChannelInfo[3]
 | 
					    ServiceId =  ChannelInfo[3]
 | 
				
			||||||
@ -905,8 +920,8 @@ def GetEPGFromIfm(ChannelInfo):
 | 
				
			|||||||
            if(debug): printError(ChannelName + str(e))
 | 
					            if(debug): printError(ChannelName + str(e))
 | 
				
			||||||
            else: pass
 | 
					            else: pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Get EPG data from KBS
 | 
					# Get EPG data from KBS Radio
 | 
				
			||||||
def GetEPGFromKbs(ChannelInfo):
 | 
					def GetEPGFromKbsRadio(ChannelInfo):
 | 
				
			||||||
    ChannelId = ChannelInfo[0]
 | 
					    ChannelId = ChannelInfo[0]
 | 
				
			||||||
    ChannelName = ChannelInfo[1]
 | 
					    ChannelName = ChannelInfo[1]
 | 
				
			||||||
    ServiceId =  ChannelInfo[3]
 | 
					    ServiceId =  ChannelInfo[3]
 | 
				
			||||||
@ -945,8 +960,8 @@ def GetEPGFromKbs(ChannelInfo):
 | 
				
			|||||||
    if(epginfo) :
 | 
					    if(epginfo) :
 | 
				
			||||||
        epgzip(epginfo)
 | 
					        epgzip(epginfo)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Get EPG data from ARIRANG
 | 
					# Get EPG data from ARIRANG Radio
 | 
				
			||||||
def GetEPGFromArirang(ChannelInfo):
 | 
					def GetEPGFromArirangRadio(ChannelInfo):
 | 
				
			||||||
    ChannelId = ChannelInfo[0]
 | 
					    ChannelId = ChannelInfo[0]
 | 
				
			||||||
    ChannelName = ChannelInfo[1]
 | 
					    ChannelName = ChannelInfo[1]
 | 
				
			||||||
    ServiceId =  ChannelInfo[3]
 | 
					    ServiceId =  ChannelInfo[3]
 | 
				
			||||||
@ -1002,6 +1017,10 @@ def GetEPGFromArirang(ChannelInfo):
 | 
				
			|||||||
            if(debug): printError(ChannelName + str(e))
 | 
					            if(debug): printError(ChannelName + str(e))
 | 
				
			||||||
            else: pass
 | 
					            else: pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#Get EPG data from TBS
 | 
				
			||||||
 | 
					def GetEPGFromTbs(ChannelInfo):
 | 
				
			||||||
 | 
					    pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Zip epginfo
 | 
					# Zip epginfo
 | 
				
			||||||
def epgzip(epginfo):
 | 
					def epgzip(epginfo):
 | 
				
			||||||
    epginfo = iter(epginfo)
 | 
					    epginfo = iter(epginfo)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user