1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-13 09:24:25 +02:00

Regex change to also match pagination

This commit is contained in:
Edvin Boul
2019-07-01 13:28:40 +03:00
parent 71652ecb00
commit ec22b13cc3

View File

@@ -35,10 +35,11 @@ public class MeituriRipper extends AbstractHTMLRipper {
@Override
public String getGID(URL url) throws MalformedURLException {
// without escape
// ^https?://[w.]*meituri\.com/a/([0-9]+)/$
// ^https?://[w.]*meituri\.com/a/([0-9]+)/([0-9\.html]+)*$
// https://www.meituri.com/a/14449/
// also matches https://www.meituri.com/a/14449/3.html etc.
// group 1 is 14449
Pattern p = Pattern.compile("^https?://[w.]*meituri\\.com/a/([0-9]+)/$");
Pattern p = Pattern.compile("^https?://[w.]*meituri\\.com/a/([0-9]+)/([0-9\\.html]+)*$");
Matcher m = p.matcher(url.toExternalForm());
if (m.matches()) {
albumID = m.group(1);