Tweaks to vinebox ripper
This commit is contained in:
parent
8bfae563d2
commit
2e1ee0fa6d
@ -31,12 +31,7 @@ public class VineboxRipper extends AbstractRipper {
|
||||
|
||||
@Override
|
||||
public URL sanitizeURL(URL url) throws MalformedURLException {
|
||||
Pattern p = Pattern.compile("^https?://(www\\.)?vinebox\\.co/u/([a-zA-Z0-9]{1,}).*$");
|
||||
Matcher m = p.matcher(url.toExternalForm());
|
||||
if (!m.matches()) {
|
||||
throw new MalformedURLException("Expected format: http://vinebox.co/u/USERNAME");
|
||||
}
|
||||
return new URL("http://vinebox.co/u/" + m.group(m.groupCount()));
|
||||
return new URL("http://vinebox.co/u/" + getGID(url));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -74,7 +69,6 @@ public class VineboxRipper extends AbstractRipper {
|
||||
@Override
|
||||
public String getGID(URL url) throws MalformedURLException {
|
||||
Pattern p = Pattern.compile("^https?://(www\\.)?vinebox\\.co/u/([a-zA-Z0-9]{1,}).*$");
|
||||
System.err.println(url);
|
||||
Matcher m = p.matcher(url.toExternalForm());
|
||||
if (!m.matches()) {
|
||||
throw new MalformedURLException("Expected format: http://vinebox.co/u/USERNAME");
|
||||
|
@ -10,11 +10,11 @@ import com.rarchives.ripme.ripper.rippers.VineboxRipper;
|
||||
public class VineboxRipperTest extends RippersTest {
|
||||
|
||||
public void testVineboxAlbums() throws IOException {
|
||||
if (false && !DOWNLOAD_CONTENT) {
|
||||
if (DOWNLOAD_CONTENT) {
|
||||
return;
|
||||
}
|
||||
List<URL> contentURLs = new ArrayList<URL>();
|
||||
contentURLs.add(new URL("http://vinebox.co/u/wiZS1MvkgEo"));
|
||||
contentURLs.add(new URL("http://vinebox.co/u/wi57hMjc2Ka"));
|
||||
for (URL url : contentURLs) {
|
||||
try {
|
||||
VineboxRipper ripper = new VineboxRipper(url);
|
||||
|
Loading…
Reference in New Issue
Block a user