336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
자바에서는 jsoup..
파이썬에서는 html파서로 적당한 것이 어떤 것이 있을까?
정답은 : BeautifulSoup <--가장 많이 쓰는 html 파서이다.
pyhtno BeautifulSoup 라이브러리 다운로드 주소 입니다.
샘플로는 아래 ...소스를 참고해주세요~~
from BeautifulSoup import BeautifulSoup import urllib2 url="http://www.utexas.edu/world/univ/alpha/" page=urllib2.urlopen(url) soup = BeautifulSoup(page.read()) universities=soup.findAll('a',{'class':'institution'}) for eachuniversity in universities: print eachuniversity['href']+","+eachuniversity.string
'프로그래밍 > 파이썬' 카테고리의 다른 글
python에서 beautifulsoup 사용하기 - html 파싱을 위해 (0) | 2013.10.05 |
---|---|
__pycache__ 이거는 무슨 폴더인가 (0) | 2013.10.05 |
python 에서 BeautifulSoup4 사용하기 (0) | 2013.10.05 |
pyhon 이클립스와 안드로이드 겸용으로 사용후... (0) | 2013.10.01 |
1. 파이썬 시작하기 (0) | 2013.08.06 |