為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

How to know which is the JSON site for a link?

  • 3 回覆
  • 1 有這個問題
  • 1 次檢視
  • 最近回覆由 cor-el

more options

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?

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)

more options

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
more options

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?

more options

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.