Skip to content
Advertisement

Python, extract XHR response data from website

I am trying to extract some data from https://www.barchart.com/stocks/signals/top-bottom/top?viewName=main.

I am able to extract data from normal html using the xpath method, however i noticed that this website gets its data from a network.

I have found the location of where the data I want is (the table from the barchart website) which is shown in the picture below.

Picture of XHR response

How can i scrape just the response portion?

Thanks!

Advertisement

Answer

Try this code.

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement