skip to Main Content

How can Beautiful Soup retrieve an object with multiple attributes?

I am using the find function to retrieve this object: <h1 data-testid=“organization-cover-title” class=“sc-1wcv2gl-2 kpUYKd”>Company</h1> With this code below, it returns a NoneType company = soup.find(‘h1’, attrs = {‘data-testid’:‘organization-cover-title’, ‘class’:‘sc-1wcv2gl-2 kpUYKd’}).string It also does not return a string with one or…

VIEW QUESTION

How can I web scrape specific details from an HTML tag?

I'm trying to scrape specific details as a list from a page using BeautifulSoup in python. <p class="collapse text in" id="list_2"> <big>•</big> &nbsp;car <br> <big>•</big> &nbsp;bike&nbsp; <br> <span id="list_hidden_2" class="inline_hidden collapse in" aria-expanded="true"> <big>•</big> &nbsp;bus <br> <big>•</big> &nbsp;train <br><br> </span>…

VIEW QUESTION
Back To Top
Search