How to know which is the JSON site for a link?
Hello. I need to find the JSON version of a site to do the scraping of a site in Python: http://divulgacandcontas.tse.jus.br/divulga/#/candidato/2016/2/71072/250000004975/bens
I've been informed that the JSON site is this: http://divulgacandcontas.tse.jus.br/divulga/rest/v1/candidatura/buscar/2016/71072/2/candidato/250000004975
In Firefox, I clicked on Inspect element on the first site above. Then on the Network tab. Then I selected XHR
But the JSON site link did not appear. Nothing appears. Even pressing F5 or clearing the cache
Please, can it be some wrong configuration in my browser / dev console that does not allow displaying the JSON site? Or is there any way to do this?
모든 댓글 (3)
That links shows JSON code for me on Linux if I open the link in a tab.
- http://divulgacandcontas.tse.jus.<i>br/divulga/#/candidato/2016/2/71072/250000004975/bens
I see two XHR requests in the Network Monitor (it takes a few seconds before they appear).
GET /divulga/rest/v1/eleicao/eleicao-atual?idEleicao=2 HTTP/1.1 Host: divulgacandcontas.tse.jus.br Accept: application/json, text/plain, */*
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked
GET /divulga/rest/v1/candidatura/buscar/2016/71072/2/candidato/250000004975 HTTP/1.1 Host: divulgacandcontas.tse.jus.br Accept: application/json, text/plain, */*
HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked
Thank you very much, but it does not work here. I'll write exactly what I did: - I opened the link (http://divulgacandcontas.tse.jus.br/divulga/#/candidato/2016/2/71072/250000004975/bens) in Firefox Quantum - I clicked the page with the right mouse button and then Inspect Element - I selected the Network tab - Then I checked the HTML, JS and XHR buttons - I pressed F5 - The screen shows three GETs for me. An html and two js, but no xhr
Did i do something wrong?
You need to reload the page (F5) if the Network Monitor isn't open while the page is loading, otherwise only newly requested content is shown.