Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use execjs to execute JavaScript with Chinese parameters in Python

Shulou Source: shulou.com Published: 2022-06-01 03:02:21 09月22日 Update

This article is about how Python uses execjs to execute JavaScript with Chinese parameters. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

A piece of JavaScript code containing data was crawled:

Import reimport requestsheaders = {"user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36", "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3" Res = requests.get ("https://www.kuaikanmanhua.com/web/comic/100868/", headers=headers) script = re.findall (" window.__NUXT__= ([^) ")

Tags: Code data environment results parameters Chinese content again files more articles good practical functions variables articles source code directories see knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei MariaDB Redmi Shulou Technology OPPO Reno