From 30d29bfa802498a6dd8d76d37a1a389cbf0319f8 Mon Sep 17 00:00:00 2001 From: FooIbar <118464521+FooIbar@users.noreply.github.com> Date: Fri, 8 Sep 2023 14:52:04 +0800 Subject: [PATCH] Fix torrent parsing --- app/src/main/rust/src/parser/torrent.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/rust/src/parser/torrent.rs b/app/src/main/rust/src/parser/torrent.rs index 38b6c9b2b7..96e2cbac87 100644 --- a/app/src/main/rust/src/parser/torrent.rs +++ b/app/src/main/rust/src/parser/torrent.rs @@ -30,7 +30,7 @@ pub fn parseTorrent(env: JNIEnv, _class: JClass, buffer: JByteBuffer, limit: jin parse_bytebuffer(&mut env, buffer, limit, |dom, parser, _env| { Some(dom.query_selector("table")?.filter_map(|e| { let html = e.get(parser)?.inner_html(parser); - let grp = regex!(" ([0-9-]+) [0-9:]+[\\s\\S]+ ([0-9.]+ [KMGT]B)[\\s\\S]+ ([0-9]+)[\\s\\S]+ ([0-9]+)[\\s\\S]+ ([0-9]+)[\\s\\S]+([^<]+)[\\s\\S]+onclick=\"document.location='([^\"]+)'[^<]+>([^<]+)").captures(&html).unwrap(); + let grp = regex!(" ([0-9-]+) [0-9:]+[\\s\\S]+ ([0-9.]+ [KMGT]iB)[\\s\\S]+ ([0-9]+)[\\s\\S]+ ([0-9]+)[\\s\\S]+ ([0-9]+)[\\s\\S]+([^<]+)[\\s\\S]+onclick=\"document.location='([^\"]+)'[^<]+>([^<]+)").captures(&html).unwrap(); let name = unescape(&grp[8]).ok()?; Some(Torrent { posted: grp[1].to_string(),