
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
공부하던 와중에 실무에 적용해보고 싶어, 하기 홈페이지 내 회사 이름들을 긁어오려고 합니다.
이 과정에서 하기와 같이 코드를 생성했는데요! <div></div>로 이루어져있어 그런지 출력값에 오류가 생깁니다. 이 경우 어떻게 적용할 수 있나요?
https://www.ces.tech/Exhibits/Exhibitor-Directory.aspx

전체 화면 캡처

작성한 코드 및 에러 메세지
import requests
from bs4 import BeautifulSoup
headers = {'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36'}
data = requests.get('https://www.ces.tech/Exhibits/Exhibitor-Directory.aspx',headers=headers)
soup = BeautifulSoup(data.text, 'html.parser')
title = soup.select_one('#alpha-\# > section > div:nth-child(1) > h3 > a')
names = soup.select('#alpha-\# > section > div')
for name in names:
a=name.select_one(h3 > a)
print(a)
#alpha-\# > section > div:nth-child(3) > h3 > a
#alpha-\# > section > div:nth-child(1) > h3 > a
