0
이것은 BeautifulSoup를 사용하여 python2.7에서 html 테이블을 구문 분석하는 방법에 관한 문맥 별 질문입니다.BeautifulSoup를 사용하여 테이블을 구문 분석하는 방법은 무엇입니까?
나는 here html 테이블을 추출하여 tab-delim csv에 넣고 BeautifulSoup로 재생 해 보았습니다. 문맥
코드 :
proxies = {
"http://": "198.204.231.235:3128",
}
site = "http://sloanconsortium.org/onlineprogram_listing?page=11&Institution=&field_op_delevery_mode_value_many_to_one[0]=100%25%20online"
r = requests.get(site, proxies=proxies)
print 'r: ', r
html_source = r.text
print 'src: ', html_source
soup = BeautifulSoup(html_source)
왜이 코드는 4 행을 얻을하지 않는 이유는 무엇입니까?
soup.find('table','views-table cols-6').tr[4]
헤더 행이 아닌 첫 번째 행의 모든 요소를 어떻게 인쇄합니까?