Package org.jsoup.nodes

Examples of org.jsoup.nodes.Document.location()


                String image = object.getString("fullsizeUrl");
                filesIndex += 1;
                addURLToDownload(new URL(image),
                        "",
                        object.getString("location"),
                        albumDoc.location(),
                        pageResponse.cookies());
            }
        }
        // Get subalbums
        if (url != null) {
View Full Code Here


        public void run() {
            try {
                Document doc = getLargestImagePageDocument(this.url);
                Elements fullsizeImages = doc.select("div#allsizes-photo img");
                if (fullsizeImages.size() == 0) {
                    logger.error("Could not find flickr image at " + doc.location() + " - missing 'div#allsizes-photo img'");
                    return;
                }
                else {
                    String prefix = "";
                    if (Utils.getConfigBoolean("download.save_order", true)) {
View Full Code Here

        while (doc != null) {
            List<String> imageURLs = getURLsFromPage(doc);

            if (imageURLs.size() == 0) {
                throw new IOException("No images found at " + doc.location());
            }

            for (String imageURL : imageURLs) {
                if (isStopped()) {
                    break;
View Full Code Here

    }

    @Test
    public void handles201Created() throws IOException {
        Document doc = Jsoup.connect("http://direct.infohound.net/tools/201.pl").get(); // 201, location=jsoup
        assertEquals("http://jsoup.org", doc.location());
    }

    @Test
    public void fetchToW3c() throws IOException {
        String url = "http://jsoup.org";
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.