Fixed Deviantart getUsernameFromURL

This commit is contained in:
cyian-1756 2018-07-06 01:32:28 -04:00
parent e8f91d1794
commit 07670c98f8

View File

@ -122,7 +122,7 @@ public class DeviantartRipper extends AbstractJSONRipper {
} }
private String getUsernameFromURL(String u) { private String getUsernameFromURL(String u) {
Pattern p = Pattern.compile("^https?://www\\.deviantart\\.com/([a-zA-Z0-9\\-]+)/gallery/\\S+"); Pattern p = Pattern.compile("^https?://www\\.deviantart\\.com/([a-zA-Z0-9\\-]+)/gallery/?(\\S+)?");
Matcher m = p.matcher(url.toExternalForm()); Matcher m = p.matcher(url.toExternalForm());
if (m.matches()) { if (m.matches()) {
return m.group(1); return m.group(1);