I would like to scrape all exhibitors and booth numbers from this website: https://floorplan.live/interactive/shows/3100/views/8/plan
Currently, I have this:
url = "https://floorplan.live/interactive/shows/3100/views/8/plan"
response = requests.get(url)
html = response.text
# Create a BeautifulSoup object
soup = BeautifulSoup(html)
# Find all <td> tags
td_tags = soup.find_all('td')
# Iterate over each <td> tag and extract the text
for td in td_tags:
# Check if the class attribute matches the class name
if 'text-concat-sm' in td.get('class', []):
# Extract text from the <div> tag inside the <td> tag
name = td.find('div').text.strip()
print(name)
elif 'text-concat' in td.get('class', []):
# Extract text from the <div> tag inside the <td> tag
booth = td.find('div').text.strip()
print(booth)
But it seems like the html content doesn’t contain the td tags 🙁 Why is this the case?
Thank you in advance
New contributor
user22279494 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.