I
I
isaac-212021-01-09 16:45:32
Scrapy
isaac-21, 2021-01-09 16:45:32

How to get information sent by ajax?

Please tell me, there is a site , the data is loaded with ajax
, I go to the Network tab on the developer panel,
then I see a link with parameters, go through it, but I don’t see any data, only the entry "get / rating"
How can I get data that using ajax get into the table on the site5ff9b30ca36ec167710620.png5ff9b31338422506410278.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-01-09
@isaac-21

Copy the entire request, not just the URL. In this case, you need a titleX-Requested-With

import requests

url = "http://mozgoboy.ru/ajax?action=get/rating&city=5&season=all&league=1&search_team_name=&_=1610204052611"

headers = {
  'X-Requested-With': 'XMLHttpRequest'}

response = requests.request("GET", url, headers=headers)

print(response.text)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question