Parsing Title of the Website using Jsoup

Parsing Title of the Website using Jsoup

Howdy, You know you can parse any part of the website using the powerful open source tool called “Jsoup”.

Jsoup download link:

Jsoup Download Link

Example Program:

package in.javadomain;


import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class TitleParseJsoup {

	 * Main Method to parse title of the website using jsoup
	 * @param args
	public static void main(String[] args) {
		Document doc;
		try {
			// You can use post method if needed like below.
			// Jsoup.connect("").post();
			doc = Jsoup.connect("").get();
			// title method gives the title of the website.
			String title = doc.title();
			System.out.println("Javadomain website Title => " + title);
		} catch (IOException e) {
			System.out.println("Exception in Jsoup  " + e.getMessage());

[plain gutter=”false”]Javadomain website Title => Javadomain[/plain]

776 total views, 1 views today

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.