Coder Social home page Coder Social logo

spider_dai_lian_tong's Introduction

王者农药代练通订单爬虫

前记:一个农药代练的同学找到我,说代练抢不到单😢,想让我帮他写个程序:如果有新订单就提醒他去抢单。这里爬取王者农药代练通最新订单信息,代码只写一个Demo,爬取苹果微信最新的20条订单信息,大家可以接着改。

代练通接口反爬原理

订单接口URL:https://server.dailiantong.com/API/AppService.ashx?Action=LevelOrderList&callback=callback&IsPub=1&GameID=107&ZoneID=1033&ServerID=0&SearchStr=&Sort_Str=&PageIndex=1&PageSize=20&Price_Str=&PubCancel=0&SettleHour=0&FilterType=0&PGType=2&UserID=0&TimeStamp=1565447134&Ver=1.0&AppVer=2.0.0&AppOS=webapp&AppID=webapp&Sign=c611d64305b60702ec3309aacf5cf36f

它们的数据接口主要是通过一个签名参数Sign和时间戳参数TimeStamp进行校验反爬的,我们去找一下网站的JS代码:

找到加密

继续往下看

JS签名加密函数

这加密还是挺简单的:主要是通过一个SignKey、查询参数还有时间戳进行MD5加密

👇的字符串就是用来得到签名的,构造这样的字符串,进行MD5加密就能得到我们签名了

J

得到签名就可以写代码,最后得到的订单的数据: image

spider_dai_lian_tong's People

Contributors

benjamin1901 avatar

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.