생활
파이썬 크롤링에 관련해서 질문드립니다.
beautifulsoup를 사용해서 크롤링을 하고있는데, 게시글 제목을 가져오려고 chrome에서 copy selector사용해서 가져오려고 합니다.
copy selector 해보니
#div_content > div:nth-child(11) > div.list_title > a > span.subject_fixed 라고 나오길
html = req.text soup = BeautifulSoup(html, 'html.parser') posts = soup.select('span.subject_fixed')이런식으로 코드 짜봣는데 posts 배열이 빈 배열이라고 나오네요;;
어디가 문제인걸까요?
1개의 답변이 있어요!