Created
December 4, 2011 05:30
-
-
Save green-coder/1429289 to your computer and use it in GitHub Desktop.
Example of how to parse an html file with Jsoup.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import org.jsoup.Jsoup; | |
import org.jsoup.nodes.Document; | |
import org.jsoup.nodes.Element; | |
public class App { | |
public static void main(String[] args) throws IOException { | |
Document doc = Jsoup.connect ("http://project2612.org/details.php?id=86").get(); | |
Element element = doc.select("td:containsOwn(English Title) + td").first(); | |
System.out.println("English name of the game: " + element.text()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code displays "Quack Shot Starring Donald Duck".