KT함수까지 완성

This commit is contained in:
wonipapa 2017-08-31 17:41:51 +09:00
parent f543d74189
commit ff5d254967

View File

@ -285,7 +285,7 @@ def GetEPGFromLG(ChannelInfo):
startTime = startTime.strftime('%Y%m%d%H%M%S') startTime = startTime.strftime('%Y%m%d%H%M%S')
rating = 0 if cell[1].find('span', {'class': 'tag cte_all'}).text.strip()=="All" else int(cell[1].find('span', {'class': 'tag cte_all'}).text.strip()) rating = 0 if cell[1].find('span', {'class': 'tag cte_all'}).text.strip()=="All" else int(cell[1].find('span', {'class': 'tag cte_all'}).text.strip())
cell[1].find('span', {'class': 'tagGroup'}).decompose() cell[1].find('span', {'class': 'tagGroup'}).decompose()
pattern = '(<재>?)?(.*?)(?;\[(.*)\])?\s?(?:\(([\d,]+)회\))?$' pattern = '(<재>?)?(.*?)(?:\[(.*)\])?\s?(?:\(([\d,]+)회\))?$'
matches = re.match(pattern, cell[1].text.strip().decode('string_escape')) matches = re.match(pattern, cell[1].text.strip().decode('string_escape'))
if not (matches is None): if not (matches is None):
programName = matches.group(2).strip() if matches.group(2) else '' programName = matches.group(2).strip() if matches.group(2) else ''