find() . , findAll
,
project_elements = soup.findAll('h6', {'class': 'project-title'})
project_titles = [project.findChildren('a')[0].text for project in project_elements]
print(project_titles)
h6 class project-title. .
, , , - .
edit: , , a , findAll
:
project_titles = [project.findChildren('a')[0].text for project in project_elements if project.findChildren('a')]
, project.findChildren('a') . (if [] False)
edit: (class project-blurb), HTML.
<p class="project-blurb">
Bagel is a digital tape measure that helps you measure, organize, and analyze any size measurements in a smart way.
</p>
project-blurb. , , , project_elements :
project_desc = [description.text for description in soup.findAll('p', {'class': 'project-blurb'})]