Skip to content

Commit

Permalink
Support for motherless groups
Browse files Browse the repository at this point in the history
Isue #8
  • Loading branch information
4pr0n committed Jul 20, 2014
1 parent ae4949d commit 29f210a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ public String getGID(URL url) throws MalformedURLException {
if (m.matches()) {
return m.group(m.groupCount());
}
p = Pattern.compile("^https?://(www\\.)?motherless\\.com/g[iv]/([a-zA-Z0-9%\\-_]+)$");
m = p.matcher(url.toExternalForm());
if (m.matches()) {
return m.group(m.groupCount());
}
throw new MalformedURLException("Expected URL format: http://motherless.com/GIXXXXXXX, got: " + url);
}

Expand Down

0 comments on commit 29f210a

Please sign in to comment.