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 to make a data-attr read HTML

I have a data-attr Tooltip which display only text. Now I want to add <a href="google.com">Lorem</a> in one phrase. Like for example tooltip="Hello, this is <a href="google.com">Lorem</a> welcome" But I can not implement the HTML because it will read it…

VIEW QUESTION
Back To Top
Search