forked from AdvancedProgramming1404/HW-5-IMDB-SCRAPER
hw5
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import java.io.IOException;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
// The relative path automatically points to the resources folder
|
||||
String filePath = "src/main/resources/Movies.html";
|
||||
|
||||
try {
|
||||
// Instantiate the parser
|
||||
Parser parser = new Parser(filePath);
|
||||
|
||||
// TODO: You can test your code here before you run the unit tests.
|
||||
// Example: Call your sorting methods, iterate through the returned list,
|
||||
// and print out the movies to see if they match the expected results in the Help folder.
|
||||
|
||||
System.out.println("Movies parsed successfully! Total movies: " + parser.sortByTitle().size());
|
||||
|
||||
} catch (IOException e) {
|
||||
System.err.println("Error reading or parsing the HTML file: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user