LG 소스로 하는 채널 기간에 따른 에러 치러 추가
This commit is contained in:
		
							parent
							
								
									4a1c52775d
								
							
						
					
					
						commit
						957c8274d3
					
				@ -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()])
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user