A
A
Alexey Romanov2021-08-23 11:10:50
Python
Alexey Romanov, 2021-08-23 11:10:50

Python requests, how to click on a button?

I am developing parsers on python requests. What parameters should be passed to the http request to click on the oneclick button. For example the site https://24score.pro/football/match/608022-west_ham... (selected randomly) has three buttons for the last 20, 10 and 5 matches. by default the first button is loaded, but how to load the page with the second and third button?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
soremix, 2021-08-23
@bely_volk95

Pressing the button through requests - no way.
All you can do is see what happens when the button is clicked and try to repeat the same action through requests.
Specifically, on this site, all data is initially loaded onto the page, and when you click on the buttons, nothing happens except switching tabs

T
thatguy1, 2021-08-23
@thatguy1

In this case, through requests - no way. Need to use WebDriver for python .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question