Python beautifulsoup - getting input value

后端 未结 2 1179
礼貌的吻别
礼貌的吻别 2021-01-01 15:48

I\'ve got many table rows like this:


    100
    200
    

        
2条回答
  •  离开以前
    2021-01-01 16:16

    soup = BeautifulSoup(html)
    try:
        value = soup.find('input', {'id': 'xyz'}).get('value')
    except:
        pass
    

提交回复
热议问题