Creates an abstract ripper and instructs it to rip. @param url URL to be ripped @throws Exception Nothing too specific here, just a catch-all.
(URL url)
| 97 | * |
| 98 | */ |
| 99 | private static void rip(URL url) throws Exception { |
| 100 | AbstractRipper ripper = AbstractRipper.getRipper(url); |
| 101 | ripper.setup(); |
| 102 | ripper.rip(); |
| 103 | |
| 104 | String u = ripper.getURL().toExternalForm(); |
| 105 | Date date = new Date(); |
| 106 | if (HISTORY.containsURL(u)) { |
| 107 | HistoryEntry entry = HISTORY.getEntryByURL(u); |
| 108 | entry.modifiedDate = date; |
| 109 | } else { |
| 110 | HistoryEntry entry = new HistoryEntry(); |
| 111 | entry.url = u; |
| 112 | entry.dir = ripper.getWorkingDir().getAbsolutePath(); |
| 113 | try { |
| 114 | entry.title = ripper.getAlbumTitle(ripper.getURL()); |
| 115 | } catch (MalformedURLException ignored) { } |
| 116 | HISTORY.add(entry); |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | /** |
| 121 | * For dealing with command-line arguments. |
no test coverage detected