• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
山城小跳
博客园    首页    新随笔    联系   管理    订阅  订阅

js_浏览器调试(node 镜像源)

nodejs的安装

https://nodejs.org/en/
# 命令行运行 node+js 文件名
# 在pycharm中安装插件 Node.js后就可以一直run运行啦

插件

python如何调用js

pyexjs--->专门调用js的
# 安装命令:pip install pyexecjs2
import execjs
print(execjs.get().name)  
# 运行结果:Node.js (V8),如果不显示Node.js (V8),有可能是path环境变量加载有问题,重启pycharm大概率可以解决
# 如何使用:
#在使用python调用之前,一定要在js文件里调通它。
#如果你已在js文件里调通了,那么请将你的测试代码干掉。防止出现一些特殊的逻辑问题...
with open("xxx.js","r",encoding="utf-8")as f:
    js =f.read()
obj = execjs.compile(js)
result = obj.call("函数名",参数)

浏览器工具的使用

找到加密入口的方法

# 1.启动器

更换npm为国内的镜像

#npm官方库搜索:  https://www.npmjs.com/
​#JS语法规则:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference

​#rsa.js很古老的一个库   https://ohdave.com/rsa/

1.首先打开我的电脑,找到C盘中用户得出文件夹,找到你当前正在使用的用户

registry=http://registry.npmmirror.com/

disturl=https://registry.npmmirror.com/-/binary/node/
# node-sass预编译二进制文件下载地址
sass_binary_site=https://registry.npmmirror.com/-/binary/node-sass
# sharp预编译共享库, 截止2022-09-20 sharp@0.31.0的预编译共享库并未同步到镜像, 入安装失败可切换到sharp@0.30.7使用
sharp_libvips_binary_host=https://registry.npmmirror.com/-/binary/sharp-libvips
python_mirror=https://registry.npmmirror.com/-/binary/python/
electron_mirror=https://registry.npmmirror.com/-/binary/electron/
electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/
# 无特殊配置参考{pkg-name}_binary_host_mirror={mirror}
canvas_binary_host_mirror=https://registry.npmmirror.com/-/binary/canvas
node_sqlite3_binary_host_mirror=https://registry.npmmirror.com/-/binary/sqlite3
better_sqlite3_binary_host_mirror=https://registry.npmmirror.com/-/binary/better-sqlite3
posted @ 2025-02-27 17:06  字母一哥  阅读(34)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3