How can get the data api address with chrome or other tool?

  python, web-crawler

I want to extract all data from the url.
extract the data in webpage

To type http://16.push2.eastmoney.com/api/qt/clist/get in chrome’s inspect,get nothing!

enter image description here

enter image description here

It is a bit of complicated to get the data from the direct url address http://quote.eastmoney.com/center/fullscreenlist.html#convertible_comparison.
There are 8 pages ,you have to extract data in one webpage and turn to other page and extract it over and over.

Searched a project which can get the data from an api,i show part of the codes here:

url = "http://16.push2.eastmoney.com/api/qt/clist/get"
params = {
    "pn": "1",
    "pz": "5000",
    "po": "1",
    "np": "1",
    "ut": "bd1d9ddb04089700cf9c27f6f7426281",
    "fltt": "2",
    "invt": "2",
    "fid": "f243",
    "fs": "b:MK0354",
    "fields": "f1,f152,f2,f3,f12,f13,f14,f227,f228,f229,f230,f231,f232,f233,f234,f235,f236,f237,f238,f239,f240,f241,f242,f26,f243",
    "_": "1590386857527",
}
r = requests.get(url, params=params)
text_data = r.text
print(text_data)

The method above is so simple,but i want to know how can get the data api from http://quote.eastmoney.com/center/fullscreenlist.html#convertible_comparison , analyse data stream to get http://16.push2.eastmoney.com/api/qt/clist/get ,with chrome’s inspect or other tools and method?Please show the way to get it.

Source: Python Questions

LEAVE A COMMENT