GithubHelp home page GithubHelp logo

jd-puppeteer-yuyue's Introduction

京东抢购显卡预约爬虫

因为每天都要抢显卡, 花费 1 小时研究京东接口发现过于繁琐, 最后决定基于 puppeteer 花费 1 小时完成快速爬取内容并生成商品列表与 BP 链接

脚本的目的

其实这个仓库是和另外一个抢购脚本一起使用的, 解决抢购脚本每次要手动录入的麻烦操作. 故在 build 文件夹下生成了一个 JSONP 文件用于自动更新抢购脚本的列表.

使用

没想到真的有人用, 本想着只是存个档, 下面是使用方式:

git clone https://github.com/jf3096/jd-puppeteer-yuyue.git --depth=1
cd jd-puppeteer-yuyue
npm install (推荐 npm, 因为我配置了 .npmrc)

# 这个是执行爬虫的主程序
node index

# 另外开一个 terminal, 这个起一个 server, 用于 build 文件夹的访问
npm run test:server

# 此时, 首次会执行 puppeteer 进行页面数据爬取
# 页面爬取结果会生成到 build 文件夹下
# 目前每半小时自动执行 puppeteer 进行爬取 (因为快速编码, 所以没想过给其他人用, 所以就写死了半小时)

部署地址

目前暂时部署到 http://47.106.129.69:8080 使用, 2021年4月8日服务器过期后将无法使用
须知: 网页中点击图片进入 BP 页面 (请用微信打开), 点击文案部分进入商品详情

DEMO

http://47.106.129.69:8080

爬取截图

demo

jd-puppeteer-yuyue's People

Contributors

jf3096 avatar zwlyrunt40 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jd-puppeteer-yuyue's Issues

球球了

想问下大佬 有兴趣再写一个可以用的嘛

npm已经更新过了,还是不行

[root@3p3acaczzhotb9ut-0713535 jd-puppeteer-yuyue]# node index
/root/jd-puppeteer-yuyue/node_modules/puppeteer/lib/cjs/puppeteer/node/Launcher.js:80
throw new Error(missingText);
^

Error: Could not find expected browser (chrome) locally. Run npm install to download the correct Chromium revision (856583).
at ChromeLauncher.launch (/root/jd-puppeteer-yuyue/node_modules/puppeteer/lib/cjs/puppeteer/node/Launcher.js:80:27)
at async starter (/root/jd-puppeteer-yuyue/index.js:28:19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.