Giter Site home page Giter Site logo

jscrapy's People

Contributors

bitdeli-chef avatar jwlyn avatar xuchaoo avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

jscrapy's Issues

config 模块要重构

配置有点多,每个模块的配置都混合在一起。
希望可以形成层次关系、组关系。

不同任务的日志分开打印

不同任务的日志分别打在不同的文件里。这样是为了将来在web控制台上可以单独看某一个任务的log

url重试功能

当出现超时等网络错误的时候,放回队列等待重试。

client端

实现一个命令行客户端,云端部署了集群成为一种基础设施。将配置和jar打包到一起,然后从客户端可以直接执行,指明存储位置。

Request实现

实现对header, cookie, referer, isAjax的操作

判断是否是下载失败

在一些大型商业网站,例如求职、商品房销售、外卖站点的抓取过程中。有些房子卖出去了,于是页面就不存在了。
这个时候应该有个机制直接根据返回的

  • http 状态码决定是否应该重试
  • 检测页面特殊说明,例如“此页面不存在,试试这些产品”
    来判断是否需要重试。

优先级队列

如果ajax带有时间因子,例如2秒超时。那么这ajax在迭代的时候插入到队列末尾,最终被拿出来处理的时候就会出现失效。

将请求信息一起保存到网页缓存里

生成网页的MD5保存为文件,找不到文件的原始出处。
如果出了问题也不容易查,因此使用html注释的方式将请求信息保存在网页文本中。

弱网环境

需要反复尝试,长时间尝试的站点。

请求参数参与去重?

  • 例如csrf-token, 验证码每次都不一样。这样的数据应该在接口中控制不参加去重。
  • 页面A跳转到页面A, 中间返回的code不一样。

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.