Package org.jsoup.Connection

Examples of org.jsoup.Connection.Response.cookies()


                    .timeout(5000)
                    .referrer("")
                    .userAgent(USER_AGENT)
                    .method(Method.GET)
                    .execute();
        cookies = resp.cookies();
       
        resp = Jsoup.connect("http://www.modelmayhem.com/includes/js/auth.php")
                .cookies(cookies)
                .ignoreContentType(true)
                .referrer(ref)
View Full Code Here


                .execute();
        String authText = resp.parse().html();
        String mmservice = authText.substring(authText.indexOf("token = '") + 9);
        mmservice = mmservice.substring(0, mmservice.indexOf("'"));

        cookies.putAll(resp.cookies());

        cookies.put("worksafe", "0");
        theurl = "http://www.modelmayhem.com/services/photo_viewer/albums/" + gid;
        postData.put("MMSERVICE", mmservice);
        resp = Jsoup.connect(theurl)
View Full Code Here

                    .cookies(cookies)
                    .referrer(ref)
                    .userAgent(USER_AGENT)
                    .method(Method.POST)
                    .execute();
        cookies.putAll(resp.cookies());

        theurl = "http://www.modelmayhem.com/services/photo_viewer/pictures/" + gid + "/0/0/1/0";
        this.sendUpdate(STATUS.LOADING_RESOURCE, theurl);
        logger.info("Loading " + theurl);
        resp = Jsoup.connect(theurl)
View Full Code Here

    @Override
    public Document getFirstPage() throws IOException {
        if (albumDoc == null) {
            Response resp = Http.url(url).response();
            cookies.putAll(resp.cookies());
            albumDoc = resp.parse();
        }
        return albumDoc;
    }
View Full Code Here

        String pass = new String(Base64.decode("cmlwbWVwYXNzd29yZA=="));

        Response loginPage = Http.url(urlBase + "/login/")
                                 .referrer(urlBase)
                                 .response();
        cookies = loginPage.cookies();

        Map<String,String> formData = new HashMap<String,String>();
        formData.put("action", "login");
        formData.put("retard_protection", "1");
        formData.put("name", user);
View Full Code Here

                               .referrer(urlBase + "/login/")
                               .cookies(cookies)
                               .data(formData)
                               .method(Method.POST)
                               .response();
        cookies.putAll(doLogin.cookies());
    }

    @Override
    public Document getNextPage(Document doc) throws IOException {
        // Find next page
View Full Code Here

        addURLToDownload(url, getPrefix(index));
    }
   
    private void login() throws IOException {
        Response resp = Http.url(this.url).response();
        cookies = resp.cookies();
        String ctoken = resp.parse().select("form > input[name=ctoken]").first().attr("value");

        Map<String,String> postdata = new HashMap<String,String>();
        postdata.put("user[login]", new String(Base64.decode("cmlwbWU=")));
        postdata.put("user[password]", new String(Base64.decode("cmlwcGVy")));
View Full Code Here

                   .referrer("http://en.2dgalleries.com/")
                   .cookies(cookies)
                   .data(postdata)
                   .method(Method.POST)
                   .response();
        cookies = resp.cookies();
    }
}
View Full Code Here

    @Override
    public Document getFirstPage() throws IOException {
        Response resp = Http.url(this.url)
                            .ignoreContentType()
                            .response();
        cookies = resp.cookies();

        Document doc = resp.parse();
        if (doc.html().contains("profile is private")) {
            sendUpdate(STATUS.RIP_ERRORED, "User has private profile");
            throw new IOException("User has private profile");
View Full Code Here

                            .ignoreContentType()
                            .data(postData)
                            .cookies(cookies)
                            .method(Method.POST)
                            .response();
        cookies.putAll(resp.cookies());
        Document nextDoc = resp.parse();
        if (nextDoc.select("div.gif img").size() == 0) {
            throw new IOException("No more images found");
        }
        sleep(2000);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.