I am scraping Airbnb (Link to the following page), and one of the things I want to get is since when is the host hosting, as shown in the picture below (marked with red pen):
image example
The code I am currently using to solve this is:
account_active_since = soup.find('li', class_='l7n4lsf atm_9s_1o8liyq_keqd55 dir dir-ltr').getText()
but with this code I get the following output:
3 guestsStudio1 bed1 bath
The HTML tag for it is:
<li class="l7n4lsf atm_9s_1o8liyq_keqd55 dir dir-ltr">3 years hosting</li>
What am I doing wrong?
Thank you.
New contributor
DudeAsker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.