Python 3 - Get text from tag in beautifulSoup

前端 未结 2 826
借酒劲吻你
借酒劲吻你 2020-12-21 23:46

I am using beautifulSoup to extract data from website. Text from that website changes everytime you reload your page so basically I wish to be able to set a focus on the cla

2条回答
  •  北荒
    北荒 (楼主)
    2020-12-22 00:19

    1. i usually use .get_text()

    2. yes,you can

      there is a method : .find_all(name, attrs, recursive, string, limit, **kwargs)

      **kwargs :recive anything like height ,valign ,width

      or

      attrs = {'height':'50','valign':'bottom'}

提交回复
热议问题