How to obtain the parameter (_ signature) in the hyperlink of Python: Jinri Toutiao page?

Home page:
https://www.toutiao.com/c/use.
can get the URL of the article list page by grabbing the package:
https:. / / www.toutiao.com/c/use.
return format is json, The results are as follows:

I got the above connection in Firefox. If I open it in another browser, I can"t get the data.

question:

how can efficiently get the url of all articles in the specified user"s home page in python?
to get the article url, you must get the following parameters:
as, cp, max_behot_time and _ signature

Scheme:
1. Use python to achieve the generation process of the above parameters (is it large)
2. Use selenium to load pages (slow)
3. Please add
do you have any other plans? It can realize

efficiently.

can only be analyzed by the web code itself. It should all be in js


https://s3.pstatp.com/toutiao.
line 818: e = TAC.sign (userInfo.id +''+ c.params.max_behot_time)
line 823: _ signature: e


Please see https://github.com/01ly/TTBot

Menu