Skip to content

Instantly share code, notes, and snippets.

@youpy
Last active December 14, 2015 08:19
Show Gist options
  • Save youpy/5056898 to your computer and use it in GitHub Desktop.
Save youpy/5056898 to your computer and use it in GitHub Desktop.
### Eclipse Workspace Patch 1.0
#P JDownloader
Index: src/jd/plugins/hoster/BandCampCom.java
===================================================================
--- src/jd/plugins/hoster/BandCampCom.java (revision 20104)
+++ src/jd/plugins/hoster/BandCampCom.java (working copy)
@@ -67,7 +67,8 @@
br.getPage(downloadLink.getDownloadURL());
if (br.containsHTML("(>Sorry, that something isn\\'t here|>start at the beginning</a> and you\\'ll certainly find what)")) throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
Regex filenameRegex = br.getRegex("<title>(.*?) \\| (.*?)</title>");
- String artist = filenameRegex.getMatch(1);
+ Regex artistRegex = br.getRegex("<meta itemprop=\"name\" content=\"([^\"]+)\"/>");
+ String artist = artistRegex.getMatch(0);
String filename = filenameRegex.getMatch(0);
final String trackNum = br.getRegex("\"track_num\":(\\d+)").getMatch(0);
DLLINK = br.getRegex("\"file\":\"(http:.*?)\"").getMatch(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment