Beautiful Soup Find - get just the text

前端 未结 3 1467
一向
一向 2021-01-22 19:34

I had this bit of code spitting out just the price as a string (125.01), but I must have changed something because now it prints the whole line with the html tags and everything

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-22 20:08

    You use get_text() on your soup tag.

    print(price.get_text())
    

提交回复
热议问题