从动态网站生成静态内容 | generate static site from dynamic
quick glance: https://www.youtube.com/watch?v=mTlFHIxuEVo&list=PLM1v95K5B1ntVsYvNJIxgRPppngrO_X4s
# 安装依赖 | install packages
yarn
# 编译 typescript | build ts to js
yarn build
# 生成静态内容 | generate static
node build/start.js -u http://soft.antutu.com
# 启动静态服务 | serve static
http-server ./generated
-
puppeteer is more a browser than just crawler, js and css may load resources
-
with
headless:false
and longer wait time, you can interact with page, which may and find hidden resource, then refine the logic -
with
devtools:true
you can see network status -
with typescript, better hint, easier to customize