From 957c8274d3bc3ac624f2d75aa9534c6d079cfbf2 Mon Sep 17 00:00:00 2001 From: wonipapa Date: Wed, 9 Nov 2016 18:20:44 +0900 Subject: [PATCH] =?UTF-8?q?LG=20=EC=86=8C=EC=8A=A4=EB=A1=9C=20=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EC=B1=84=EB=84=90=20=EA=B8=B0=EA=B0=84=EC=97=90=20?= =?UTF-8?q?=EB=94=B0=EB=A5=B8=20=EC=97=90=EB=9F=AC=20=EC=B9=98=EB=9F=AC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epg2xml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epg2xml.py b/epg2xml.py index 7a13cd3..ddb8c8c 100644 --- a/epg2xml.py +++ b/epg2xml.py @@ -17,7 +17,7 @@ import argparse reload(sys) sys.setdefaultencoding('utf-8') -__version__ = '1.0.2' +__version__ = '1.0.3' # Set My Configuration default_icon_url = '' # TV channel icon url (ex : http://www.example.com/Channels) @@ -177,7 +177,7 @@ def GetEPGFromLG(ChannelInfo): u = urllib.urlopen(url).read() data = unicode(u, 'euc-kr', 'ignore').encode('utf-8', 'ignore') soup = BeautifulSoup(data,'lxml', from_encoding='utf-8') - html = soup.find('table', {'class':'datatable06'}).tbody.findAll('tr') + html = soup.find('table', {'class':'datatable06'}).tbody.findAll('tr') if soup.find('table', {'class':'datatable06'}) else '' for row in html: for cell in [row.findAll('td')]: epginfo.append([cell[1].text.strip(), str(day) + ' ' + cell[0].text, cell[2].text.strip(), cell[1].find('img', alt=True)['alt'].strip()])