Answer the question
In order to leave comments, you need to log in
How to access an element through BeautifulSoup?
Hello everyone, just started learning python.
There was a question on BeautifulSoup
How to access a certain element if it does not have a class set?
For example:
<div class="myclass">
<h4><a href="#"> Текст ссылки </a></h4>
</div>
soup.find_all('a', {'class':'class_name'):
Answer the question
In order to leave comments, you need to log in
link = bs_obj.find('a', href=re.compile('regexp'))
link = bs_obj.find('div', {'class': 'className'}).h6.find_all('a')[0]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question