인프런 커뮤니티 질문&답변
답변 1
0
from bs4 import BeautifulSoup
import re
import urllib.request as e
url = "https://www.daegu.ac.kr/article/DG159/list"
e = e.urlopen(url).read()
bs = BeautifulSoup(e, 'lxml')
top = bs.select("#sub_contents > div > table > tbody:nth-child(4) > tr")
for i, a in enumerate(top,1):
print(i, a.find("a").string)
심심해서 학교홈페이지 해보니까, 그건 또 잘 됩니다...





