I'm building a web crawler for searching. Because I just need the title of article for indexing. I use Jsoup to connect URL destination.
Jsoup.connect(url).timeout(20000).execute();
But I got a problem connection timeout . I wonder if timeout occurs because of loading many images on that URL.
How can I get a webpage without loading images using Jsoup?
Just to confirm that the page is not taking too long to load, try opening that URL in a browser and observe the time taken to load the page.
Jsoup has an option to wait infinitely by providing (0)
in the timeout, like
Jsoup.connect(url).timeout(0).execute();
However for the timeout is better explained in the following link .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.