Skip to content

Commit

Permalink
Merge branch 'vget-1.0.33'
Browse files Browse the repository at this point in the history
  • Loading branch information
axet committed Dec 9, 2012
2 parents fb7a94a + 13bab44 commit 7db7194
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.github.axet</groupId>
<artifactId>vget</artifactId>
<packaging>jar</packaging>
<version>1.0.32</version>
<version>1.0.33</version>
<name>vget</name>
<description>vget java video download library</description>
<url>https://github.com/axet/vget</url>
Expand Down
24 changes: 18 additions & 6 deletions src/main/java/com/github/axet/vget/info/VimeoParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,24 @@ public static boolean probe(URL url) {
}

public static String extractId(URL url) {
Pattern u = Pattern.compile("vimeo.com.*/(\\d+)");
Matcher um = u.matcher(url.toString());

if (um.find())
return um.group(1);

// standard web url. format: "https://vimeo.com/49243107" or
// "http://vimeo.com/channels/staffpicks/49243107"
{
Pattern u = Pattern.compile("vimeo.com.*/(\\d+)");
Matcher um = u.matcher(url.toString());

if (um.find())
return um.group(1);
}
// rss feed url. format:
// "http://vimeo.com/moogaloop.swf?clip_id=49243107"
{
Pattern u = Pattern.compile("vimeo.com.*=(\\d+)");
Matcher um = u.matcher(url.toString());

if (um.find())
return um.group(1);
}
return null;
}

Expand Down

0 comments on commit 7db7194

Please sign in to comment.