R
R
r4khic2020-04-21 17:09:46
Parsing
r4khic, 2020-04-21 17:09:46

How to make an ajax request for a certain period?

I want to pull the results of all games from this site . After analyzing the site, I came to the conclusion that everything there, all the data is loaded by ajax. Here, for example, is the link itself to the place where the data comes from.

As a result, it turns out that I found the source, only here is the snag. I get them for a certain period of time, let's say 2020-04-21, etc.

Question: How can I get data for a specific period from 2020-03-01 ending to today?

PS:
The only solution that came to mind is to simply manually replace the date in the request every time, namely the place 2020-03-01 for 2020-03-02, etc. But something it is.

https://betgames9.betgames.tv/web/v2/games/results/testpartner/en/0/2020-03-01/0/1/

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Ilyin, 2020-04-21
@r4khic

still, string formatting is more convenient:
https://matthew-brett.github.io/teaching/string_fo...

https://betgames9.betgames.tv/web/v2/games/results/testpartner/en/0/{}/0/1/

and already in {} substitute the date you need (or at least go through the list in a loop)
you can go further:
calculate today's day using datetime (you can immediately set the output format to "year-month-day" and either enter it right away, or fill in every day between today and the one that was last filled in (just store it in a string).

E
ettychel, 2020-04-21
@ettychel

play)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question