Python: How to simulate a click using BeautifulSoup

前端 未结 2 862
庸人自扰
庸人自扰 2021-01-28 20:07

I don\'t want to use selenium since I dont want to open any browsers.

The button triggers a Javascript method that changes something in the page. I want

相关标签:
2条回答
  • 2021-01-28 20:51

    BeautifulSoup is an HtmlParser you can't do such thing. Buf if that button calls an API, you could make a request to that api and I guess that would simulate clicking the button.

    0 讨论(0)
  • 2021-01-28 20:56

    You can't do what you want. Beautiful soup is a text processor which has no way to run JavaScript.

    0 讨论(0)
提交回复
热议问题