Searching through webpage

前端 未结 2 872
[愿得一人]
[愿得一人] 2021-02-06 18:10

Hey I\'m working on a Python project that requires I look through a webpage. I want to look through to find a specific text and if it finds the text, then it prints something ou

2条回答
  •  梦谈多话
    2021-02-06 18:28

    lxml is awesome: http://lxml.de/parsing.html

    I use it regularly with xpath for extracting data from the html.

    The other option is http://www.crummy.com/software/BeautifulSoup/ which is great as well.

提交回复
热议问题