<span onclick="selectText('email_ch_text')" id="email_ch_text">10005000986@ambiancewe.us</span>
如何使用beautifoulsoup“10005000986@ambiancewe.us”
答案 0 :(得分:0)
使用此代码:
html_doc = "<span onclick=\"selectText('email_ch_text')\" id=\"email_ch_text\">10005000986@ambiancewe.us</span>"
from bs4 import BeautifulSoup
soup = BeautifulSoup(html_doc, 'html.parser')
print(soup.span.text)