HW-05 #1

Merged
Aryan merged 2 commits from develop into main 2026-06-22 00:34:49 +00:00
Showing only changes of commit 612e91fbfe - Show all commits
+2 -1
View File
@@ -1,6 +1,7 @@
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element; import org.jsoup.nodes.Element;
import org.jsoup.select.Elements; import org.jsoup.select.Elements;
import org.jsoup.Jsoup;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
@@ -43,7 +44,7 @@ public class Parser {
// TODO: Create a java.io.File object using the given 'filePath'. // TODO: Create a java.io.File object using the given 'filePath'.
File in=new File(filePath); File in=new File(filePath);
// TODO: Parse the HTML file using Jsoup.parse(file, "UTF-8"). This returns a Document object. // TODO: Parse the HTML file using Jsoup.parse(file, "UTF-8"). This returns a Document object.
Document doc= jsoup.parser(in, "UTF-8" ); Document doc = Jsoup.parse(in, "UTF-8");
// TODO: Extract the list of movie elements from the Document. // TODO: Extract the list of movie elements from the Document.
// Hint: Use document.select() or document.getElementsByClass() to find all elements with the class "movie". // Hint: Use document.select() or document.getElementsByClass() to find all elements with the class "movie".