E
E
Elick2020-08-21 18:19:16
Parsing
Elick, 2020-08-21 18:19:16

How to make a GET request after clicking on a button using selenium?

Let conditionally there is a site with a certain URL. This site has a table with a certain number of rows. After clicking on the button using selenium, the table expands. How can I then continue with an updated page (with the same URL) that already has an expanded table using requests and bs4?
PS. If anything, I'm sorry, I'm still not very rummage.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dadasay, 2020-08-21
@Elick

If the site loads data using js ("...After clicking the button using selenium, the table expands ..."), then requests will not help here.
Using driver.page_source, try to get the page code (after loading the modified table (validation, etc.), not after clicking the button (if js sends an http request to get data)). And then run the html code of the page through bs4.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question