How to get text from span tag in BeautifulSoup

后端 未结 4 873
萌比男神i
萌比男神i 2020-11-30 12:30

I have links looks like this

4条回答
  •  情话喂你
    2020-11-30 13:18

    You could solve this with just a couple lines of gazpacho:

    from gazpacho import Soup
    
    html = """\
    
    1 GB
    """ soup = Soup(html) soup.find("span", {"title": "Minimum RAM Requirement"}).text # '1 GB'

提交回复
热议问题