Differences between revisions 2 and 4 (spanning 2 versions)
Revision 2 as of 2008-02-01 13:47:50
Size: 385
Editor: 59
Comment:
Revision 4 as of 2011-11-23 14:30:58
Size: 395
Editor: 211
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
[XML], [HTML] [Parsing]을 위한 [Python] 모듈. invaliad한 문서형식도 가능. [[XML]], [[HTML]] [[Parsing]]을 위한 [[Python]] 모듈. invaliad한 문서형식도 가능.
Line 13: Line 13:

XML, HTML Parsing을 위한 Python 모듈. invaliad한 문서형식도 가능.

http://www.crummy.com/software/BeautifulSoup/

예제들

   1 from BeautifulSoup import BeautifulSoup
   2 soup = BeautifulSoup(html_string)
   3 for tr in soup.findAll('tr')
   4     print tr.find('th').contents+ [c.contents[0] for c in tr.findAll('td')]


CategoryProgramLibrary

BeautifulSoup (last edited 2011-11-23 14:30:58 by 211)

web biohackers.net