.find_all("tr")
import requests
from bs4 import BeautifulSoup
url = "https://www.iban.com/currency-codes"
request = requests.get(url)
soup = BeautifulSoup(request.text, "html.parser")
table = soup.find("table")
rows = table.find_all("tr")
print(type(rows))
#####
# 결과: <class 'bs4.element.ResultSet'>
.find_all("tr")[1:]
import requests
from bs4 import BeautifulSoup
url = "https://www.iban.com/currency-codes"
request = requests.get(url)
soup = BeautifulSoup(request.text, "html.parser")
table = soup.find("table")
rows = table.find_all("tr")[:]
print(type(rows))
#####
# 결과 : <class 'list'>
댓글