HCN 함수 수정

This commit is contained in:
wonipapa 2018-03-23 18:45:19 +09:00
parent 3f2a830378
commit 30c9f74e76
3 changed files with 6 additions and 4 deletions

View File

@ -122,6 +122,7 @@ https://github.com/wonipapa/epg2xml/wiki/FAQ
- SKB 함수 수정 - SKB 함수 수정
- SKB 함수 수정(p1) - SKB 함수 수정(p1)
- SKY 함수 수정(p2) - SKY 함수 수정(p2)
- HCN 함수 수정(p3)
### Version 1.2.4 ### Version 1.2.4
- ISCS 함수 수정 - ISCS 함수 수정
- SKB 함수 수정(p1) - SKB 함수 수정(p1)

View File

@ -3,9 +3,9 @@
@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.5p2"); define("VERSION", "1.2.5p3");
$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'";
$timeout = 5; $timeout = 5;
define("CHANNEL_ERROR", " 존재하지 않는 채널입니다."); define("CHANNEL_ERROR", " 존재하지 않는 채널입니다.");
define("CONTENT_ERROR ", " EPG 정보가 없습니다."); define("CONTENT_ERROR ", " EPG 정보가 없습니다.");
@ -1800,6 +1800,7 @@ function getWeb($url, $params, $method) {
curl_setopt($ch, CURLOPT_HEADER, False); curl_setopt($ch, CURLOPT_HEADER, False);
curl_setopt($ch, CURLOPT_FAILONERROR, True); curl_setopt($ch, CURLOPT_FAILONERROR, True);
curl_setopt($ch, CURLOPT_USERAGENT, $GLOBALS['ua']); curl_setopt($ch, CURLOPT_USERAGENT, $GLOBALS['ua']);
$response = curl_exec($ch); $response = curl_exec($ch);
if(curl_error($ch) && $GLOBALS['debug']) printError($url." ".curl_error($ch)); if(curl_error($ch) && $GLOBALS['debug']) printError($url." ".curl_error($ch));
curl_close($ch); curl_close($ch);

View File

@ -44,10 +44,10 @@ if not sys.version_info[:2] == (2, 7):
sys.exit() sys.exit()
# Set variable # Set variable
__version__ = '1.2.5p2' __version__ = '1.2.5p3'
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', 'accept': '*/*'}
timeout = 5 timeout = 5
htmlparser = 'lxml' htmlparser = 'lxml'
CHANNEL_ERROR = ' 존재하지 않는 채널입니다.' CHANNEL_ERROR = ' 존재하지 않는 채널입니다.'