Hỏi & Đáp
질문이 두가지 있습니다.
find_all로는 이렇게 import requests from bs4 import BeautifulSoup res = requests.get(' https://davelee-fun.github.io/blog/crawl_test ') soup = BeautifulSoup(res.content,'html.parser') items = soup.find_all('a') items[15].get_text() css selector로는 import requests from bs4 import BeautifulSoup res = requests.get(' https://davelee-fun.github.io/blog/crawl_test ') soup = BeautifulSoup(res.content,'html.parser') items = soup.select ('ul#dev_course_list>li.course') items[8].get_text() 이런식으로 작성하니까 해결되네요;; 다해놓고 마지막 코드를 이상하게 작성하고 있었네요.. 그럼 제가 이런식으로 코드를 짜는건 제대로 한게 맞겠죠?
- Lượt thích
- 0
- Số bình luận
- 2
- Lượt xem
- 502

