From 91c0dc4b5c32e119bf4bdb9f06ff1ff355aefd6f Mon Sep 17 00:00:00 2001 From: wonipapa Date: Thu, 12 Oct 2017 10:43:17 +0900 Subject: [PATCH] =?UTF-8?q?update=201.2.3p3=20=20=20-=20SK=20=ED=95=A8?= =?UTF-8?q?=EC=88=98=20=EC=88=98=EC=A0=95(p3)=20=20=20-=20=EC=B1=84?= =?UTF-8?q?=EB=84=90=20=EB=B3=80=EA=B2=BD=20=EC=82=AC=ED=95=AD=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Channel.json | 12 ++++++------ README.md | 5 +++-- epg2xml-web.php | 4 ++-- epg2xml.py | 8 ++++---- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Channel.json b/Channel.json index f536a18..d07695f 100644 --- a/Channel.json +++ b/Channel.json @@ -9,7 +9,7 @@ { "Id": 8, "Name": "AsiaN", "KT Name": "AsiaN", "KTCh": 111, "LG Name": "아시아N", "LGCh": 88, "SK Name": "Asia N", "SKCh": 106, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/gleMSFq.png", "Source": "SK", "ServiceId": "177" }, { "Id": 9, "Name": "Australia Plus", "KT Name": "Australia Plus", "KTCh": 258, "LG Name": "", "LGCh": null, "SK Name": "", "SKCh": null, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/6k9j2Hj.png", "Source": "NAVER", "ServiceId": "815391" }, { "Id": 10, "Name": "AXN", "KT Name": "AXN", "KTCh": 113, "LG Name": "AXN", "LGCh": 45, "SK Name": "AXN", "SKCh": 102, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/QrAXBEm.png", "Source": "LG", "ServiceId": "744" }, -{ "Id": 11, "Name": "B Shopping", "KT Name": "B Shopping", "KTCh": 30, "LG Name": "B쇼핑", "LGCh": 28, "SK Name": "", "SKCh": null, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/HiCKxpt.png", "Source": "LG", "ServiceId": "738" }, +{ "Id": 11, "Name": "B Shopping", "KT Name": "B Shopping", "KTCh": 30, "LG Name": "B쇼핑", "LGCh": 28, "SK Name": "B Shopping", "SKCh": 114, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/HiCKxpt.png", "Source": "LG", "ServiceId": "738" }, { "Id": 14, "Name": "Baby TV", "KT Name": "Baby TV", "KTCh": 146, "LG Name": "", "LGCh": null, "SK Name": "Baby TV", "SKCh": 195, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/mU7QuTz.png", "Source": "KT", "ServiceId": "146" }, { "Id": 15, "Name": "BBC Earth", "KT Name": "BBC Earth", "KTCh": 172, "LG Name": "BBC Earth", "LGCh": 130, "SK Name": "BBC earth", "SKCh": 265, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/SJZjuqO.png", "Source": "EPG", "ServiceId": "904" }, { "Id": 18, "Name": "BBC WN", "KT Name": "BBC WN", "KTCh": 192, "LG Name": "BBC World News", "LGCh": 126, "SK Name": "BBC World News", "SKCh": 160, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/IwJBNd4.png", "Source": "EPG", "ServiceId": "260" }, @@ -75,7 +75,7 @@ { "Id": 91, "Name": "HQ+", "KT Name": "HQ+", "KTCh": 253, "LG Name": "", "LGCh": null, "SK Name": "HQ+", "SKCh": 47, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/GTANuZS.png", "Source": "NAVER", "ServiceId": "3566359" }, { "Id": 92, "Name": "아이넷TV", "KT Name": "아이넷TV", "KTCh": 92, "LG Name": "아이넷TV", "LGCh": 106, "SK Name": "아이넷 TV", "SKCh": 233, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/JYQpemw.png", "Source": "SKB", "ServiceId": "261" }, { "Id": 93, "Name": "IB SPORTS", "KT Name": "IB SPORTS", "KTCh": 53, "LG Name": "IB스포츠", "LGCh": 62, "SK Name": "IB Sports", "SKCh": 129, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/wOOQEC1.png", "Source": "SKY", "ServiceId": "515" }, -{ "Id": 94, "Name": "i-Concerts", "KT Name": "", "KTCh": null, "LG Name": "아이콘서트", "LGCh": 108, "SK Name": "i-Concerts", "SKCh": 236, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/oUUZQdi.png", "Source": "LG", "ServiceId": "661" }, +{ "Id": 94, "Name": "i-Concerts", "KT Name": "", "KTCh": null, "LG Name": "", "LGCh": null, "SK Name": "i-Concerts", "SKCh": 236, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/oUUZQdi.png", "Source": "SK", "ServiceId": "786" }, { "Id": 95, "Name": "JEI EnglishTV", "KT Name": "JEI EnglishTV", "KTCh": 154, "LG Name": "JEI EnglishTV", "LGCh": 160, "SK Name": "JEI 재능 English", "SKCh": 200, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/R1oJmLo.png", "Source": "SKY", "ServiceId": "289" }, { "Id": 96, "Name": "JEI 재능TV", "KT Name": "JEI 재능TV", "KTCh": 142, "LG Name": "JEI재능TV", "LGCh": 159, "SK Name": "JEI 재능TV", "SKCh": 192, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/NoNRdSt.png", "Source": "SKY", "ServiceId": "23" }, { "Id": 97, "Name": "JTBC", "KT Name": "JTBC", "KTCh": 15, "LG Name": "JTBC", "LGCh": 15, "SK Name": "JTBC", "SKCh": 15, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/YOYosLG.png", "Source": "POOQ", "ServiceId": "C2301" }, @@ -175,7 +175,7 @@ { "Id": 221, "Name": "가요TV", "KT Name": "가요TV", "KTCh": 93, "LG Name": "가요TV", "LGCh": 102, "SK Name": "", "SKCh": null, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/6ncOOSg.png", "Source": "ISCS", "ServiceId": "356" }, { "Id": 222, "Name": "국방TV", "KT Name": "국방TV", "KTCh": 260, "LG Name": "국방TV", "LGCh": 174, "SK Name": "국방TV", "SKCh": 282, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/yyXkYzJ.png", "Source": "ISCS", "ServiceId": "114" }, { "Id": 223, "Name": "국회방송", "KT Name": "국회방송", "KTCh": 65, "LG Name": "국회방송", "LGCh": 172, "SK Name": "국회방송", "SKCh": 291, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/l1OEn7O.png", "Source": "LG", "ServiceId": "717" }, -{ "Id": 225, "Name": "내외경제TV", "KT Name": "내외경제TV", "KTCh": 285, "LG Name": "", "LGCh": null, "SK Name": "", "SKCh": null, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/cQHPmCw.png", "Source": "KT", "ServiceId": "285" }, +{ "Id": 225, "Name": "내외경제TV", "KT Name": "내외경제TV", "KTCh": 285, "LG Name": "", "LGCh": null, "SK Name": "내외경제TV", "SKCh": 164, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/cQHPmCw.png", "Source": "SKB", "ServiceId": "623" }, { "Id": 226, "Name": "다문화티브이", "KT Name": "다문화티브이", "KTCh": 283, "LG Name": "", "LGCh": null, "SK Name": "", "SKCh": null, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/nZK3lCC.png", "Source": "KT", "ServiceId": "283" }, { "Id": 228, "Name": "대교 어린이TV", "KT Name": "대교 어린이TV", "KTCh": 141, "LG Name": "어린이TV", "LGCh": 156, "SK Name": "어린이TV", "SKCh": 191, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/CETWIE6.png", "Source": "SKY", "ServiceId": "17" }, { "Id": 229, "Name": "동아TV", "KT Name": "동아TV", "KTCh": 82, "LG Name": "동아TV", "LGCh": 84, "SK Name": "동아TV", "SKCh": 218, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/AlmV8jS.png", "Source": "HCN", "ServiceId": "247" }, @@ -300,7 +300,6 @@ { "Id": 410, "Name": "메디컬TV", "KT Name": "메디컬TV", "KTCh": 254, "LG Name": "", "LGCh": null, "SK Name": "", "SKCh": null, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/S73ArUy.png", "Source": "KT", "ServiceId": "254" }, { "Id": 411, "Name": "CGTN", "KT Name": "CGTN", "KTCh": 194, "LG Name": "CGTN", "LGCh": 119, "SK Name": "CGTN", "SKCh": 161, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/rhZf4Zx.png", "Source": "ISCS", "ServiceId": "86" }, { "Id": 412, "Name": "C Music TV", "KT Name": "", "KTCh": null, "LG Name": "", "LGCh": null, "SK Name": "C Music TV", "SKCh": 237, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/hV270KM.png", "Source": "SKB", "ServiceId": "672" }, -{ "Id": 413, "Name": "Tvis", "KT Name": "", "KTCh": null, "LG Name": "", "LGCh": null, "SK Name": "Tvis", "SKCh": 250, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/7jq2VMs.png", "Source": "SKB", "ServiceId": "260" }, { "Id": 414, "Name": "SPOTV ON", "KT Name": "", "KTCh": null, "LG Name": "", "LGCh": null, "SK Name": "SPOTV ON", "SKCh": 118, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/Y3eYOc2.png", "Source": "SKB", "ServiceId": "136" }, { "Id": 415, "Name": "SPOTV ON2", "KT Name": "", "KTCh": null, "LG Name": "", "LGCh": null, "SK Name": "SPOTV ON2", "SKCh": 119, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/jbdurz4.png", "Source": "SKB", "ServiceId": "137" }, { "Id": 416, "Name": "한국선거방송", "KT Name": "한국선거방송", "KTCh": 273, "LG Name": "", "LGCh": null, "SK Name": "", "SKCh": null, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/ZSdcknl.png", "Source": "KT", "ServiceId": "273" }, @@ -339,9 +338,10 @@ { "Id": 450, "Name": "HGTV", "KT Name": "HGTV", "KTCh": 223, "LG Name": "", "LGCh": null, "SK Name": "", "SKCh": null, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/PR4w3i2.png", "Source": "KT", "ServiceId": "223" }, { "Id": 451, "Name": "다빈치러닝", "KT Name": "다빈치러닝", "KTCh": 224, "LG Name": "", "LGCh": null, "SK Name": "", "SKCh": null, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/mB9BL31.png", "Source": "KT", "ServiceId": "224" }, { "Id": 452, "Name": "E! Entertainment", "KT Name": "E! 엔터", "KTCh": 225, "LG Name": "", "LGCh": null, "SK Name": "", "SKCh": null, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/VqIgfE9.png", "Source": "KT", "ServiceId": "225" }, -{ "Id": 453, "Name": "다큐원", "KT Name": "다큐원", "KTCh": 269, "LG Name": "", "LGCh": null, "SK Name": "다큐원", "SKCh": 283, "Radio Name": "아리랑 라디오", "RadioCh": 926, "Icon_url": "http://i.imgur.com/1EZs0Tn.png", "Source": "SK", "ServiceId": "257" }, +{ "Id": 453, "Name": "다큐원", "KT Name": "다큐원", "KTCh": 269, "LG Name": "", "LGCh": null, "SK Name": "다큐원", "SKCh": 283, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/1EZs0Tn.png", "Source": "SK", "ServiceId": "257" }, { "Id": 454, "Name": "Discovery Science", "KT Name": "DSC Science", "KTCh": 222, "LG Name": "", "LGCh": null, "SK Name": "", "SKCh": null, "Radio Name": "", "RadioCh": null, "Icon_url": "http://i.imgur.com/3UfATJL.png", "Source": "KT", "ServiceId": "222" }, { "Id": 455, "Name": "Now제주TV", "KT Name": "Now제주TV", "KTCh": 94, "LG Name": "", "LGCh": null, "SK Name": "", "SKCh": null, "Radio Name": "", "RadioCh": null, "Icon_url": "https://i.imgur.com/aIvnsge.png", "Source": "KT", "ServiceId": "94" }, { "Id": 456, "Name": "Lifetime", "KT Name": "Lifetime", "KTCh": 78, "LG Name": "", "LGCh": null, "SK Name": "", "SKCh": null, "Radio Name": "", "RadioCh": null, "Icon_url": "https://i.imgur.com/vh1U91w.png", "Source": "KT", "ServiceId": "78" }, -{ "Id": 457, "Name": "플레이런TV", "KT Name": "플레이런TV", "KTCh": 155, "LG Name": "플레이런TV", "LGCh": 161, "SK Name": "플레이런TV", "SKCh": 201, "Radio Name": "", "RadioCh": null, "Icon_url": "https://i.imgur.com/nrtT3Wm.png", "Source": "LG", "ServiceId": "772" } +{ "Id": 457, "Name": "플레이런TV", "KT Name": "플레이런TV", "KTCh": 155, "LG Name": "플레이런TV", "LGCh": 161, "SK Name": "플레이런TV", "SKCh": 201, "Radio Name": "", "RadioCh": null, "Icon_url": "https://i.imgur.com/nrtT3Wm.png", "Source": "LG", "ServiceId": "772" }, +{ "Id": 458, "Name": "BET", "KT Name": "", "KTCh": null, "LG Name": "", "LGCh": null, "SK Name": "BET", "SKCh": 239, "Radio Name": "", "RadioCh": null, "Icon_url": "https://i.imgur.com/nrtT3Wm.png", "Source": "SKB", "ServiceId": "788" } ] diff --git a/README.md b/README.md index e052b7a..2ee1ace 100644 --- a/README.md +++ b/README.md @@ -127,8 +127,9 @@ https://github.com/wonipapa/epg2xml/wiki/FAQ - 에피소드 넘버 xmltv_ns 옵션 항목 추가 (epg2xml.json) - 가져오는 날짜 최대 7일로 변경 - KT 함수 수정 - - PHP 버전 socket 사용시 화면에 출력되는 문제 해결 - - PHP 버전 한글 깨지는 문제 수정 + - PHP 버전 socket 사용시 화면에 출력되는 문제 해결(p1) + - PHP 버전 한글 깨지는 문제 수정(p2) + - SK 함수 수정(p3) ### Version 1.2.2 - My Channel 추가 - 소스 추가 diff --git a/epg2xml-web.php b/epg2xml-web.php index 1adea32..f399485 100644 --- a/epg2xml-web.php +++ b/epg2xml-web.php @@ -4,7 +4,7 @@ error_reporting(E_ALL ^ E_NOTICE); @set_time_limit(0); -define("VERSION", "1.2.3p2"); +define("VERSION", "1.2.3p3"); $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'"; $timeout = 5; @@ -659,7 +659,7 @@ function GetEPGFromSK($ChannelInfo) { $ServiceId = $ChannelInfo[3]; $today = date("Ymd"); $lastday = date("Ymd", strtotime("+".($GLOBALS['period'] - 1)." days")); - $url = "http://m.btvplus.co.kr/Common/Inc/IFGetData.asp"; + $url = "http://m.btvplus.co.kr/common/inc/IFGetData.do"; $params = array( 'variable' => 'IF_LIVECHART_DETAIL', 'pcode' => '|^|start_time='.$today.'00|^|end_time='.$lastday.'24|^|svc_id='.$ServiceId diff --git a/epg2xml.py b/epg2xml.py index b5b1633..c5b435c 100644 --- a/epg2xml.py +++ b/epg2xml.py @@ -43,7 +43,7 @@ if not sys.version_info[:2] == (2, 7): sys.exit() # Set variable -__version__ = '1.2.3' +__version__ = '1.2.3p3' debug = False 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': '*/*'} @@ -313,7 +313,7 @@ def GetEPGFromSK(ChannelInfo): ChannelName = ChannelInfo[1] ServiceId = ChannelInfo[3] lastday = today + datetime.timedelta(days=period-1) - url = 'http://m.btvplus.co.kr/Common/Inc/IFGetData.asp' + url = 'http://m.btvplus.co.kr/common/inc/IFGetData.do' params = {'variable': 'IF_LIVECHART_DETAIL', 'pcode':'|^|start_time=' + today.strftime('%Y%m%d') + '00|^|end_time='+ lastday.strftime('%Y%m%d') + '24|^|svc_id=' + str(ServiceId)} try: response = requests.post(url, data=params, headers=ua, timeout=timeout) @@ -348,7 +348,7 @@ def GetEPGFromSK(ChannelInfo): producers = program['directorName'].replace('...','').strip(', ') if program['directorName'] else '' if not (program['mainGenreName'] is None) : category = program['mainGenreName'] - rating = int(program['ratingCd']) if program['programName'] else 0 + rating = int(program['ratingCd']) if program['ratingCd'] else 0 programdata = {'channelId':ChannelId, 'startTime':startTime, 'endTime':endTime, 'programName':programName, 'subprogramName':subprogramName, 'desc':desc, 'actors':actors, 'producers':producers, 'category':category, 'episode':episode, 'rebroadcast':rebroadcast, 'rating':rating} writeProgram(programdata) time.sleep(0.001) @@ -1218,4 +1218,4 @@ elif output == "socket" : else : printError("epg2xml.json 파일의 default_xml_socket항목이 없습니다."); sys.exit() -getEpg() \ No newline at end of file +getEpg()