Code Monkey home page Code Monkey logo

jjsoup's Introduction

jjsoup Maven Central

jjsoup 是基于jsoup使用javassist提供类似Python requests.Session()的API从而简化cookie保持

//创建新的Session对象,等价于requests.Session()
Session session = JJsoup.newSession();
//针对Session的统一设置
session.proxy("127.0.0.1", 8888)
        .ignoreContentType(true)
        .timeout(10 * 600);
//与Jsoup.connect()完全相同
session.connect("https://github.com/KingFalse/jjsoup").execute();
//cookie会自动存入session对象中
System.err.println(session.cookies());

Getting started

<dependency>
    <groupId>me.kagura</groupId>
    <artifactId>jjsoup</artifactId>
    <version>0.2.1</version>
</dependency>

What's New

  • 自动识别JSON,如果.requestBody()传入的是JSON则会设置Content-Type为application/json;charset=
  • 提供Map<String, Object> ext = session.ext;用于存放临时变量,更方便的构建交互式爬虫
  • 完全自动的Cookie保持

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.