mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-08-27 20:12:02 +00:00
fix(lz): port Lanzou parser to wwww.lanzoux.com flow
Use the new share/ajax/verify pipeline (arg1 retry, regex ajax extract, delayed CDN verify) on the open-source PanBase client, keeping proxy support and complete() for downloadUrl. Bump version to 0.4.4. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,52 +0,0 @@
|
|||||||
package cn.qaiu.parser.impl;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
public class LzToolAjaxExtractTest {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testExtractWpSignAjaxfile() {
|
|
||||||
String html = """
|
|
||||||
<script>
|
|
||||||
var wp_sign = 'BWMGOF5v';
|
|
||||||
var ajaxdata = 'MrBR';
|
|
||||||
var kdns =1;
|
|
||||||
$.ajax({
|
|
||||||
type : 'post',
|
|
||||||
url : '/ajaxfile.php?file=150233466',
|
|
||||||
data : { 'action':'downprocess','websignkey':ajaxdata,'signs':ajaxdata,'sign':wp_sign,'websign':'','kd':kdns,'ves':1 }
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
""";
|
|
||||||
LzTool.AjaxCall call = LzTool.extractAjaxFromHtml(html, null);
|
|
||||||
assertNotNull(call);
|
|
||||||
assertEquals("/ajaxfile.php?file=150233466", call.path());
|
|
||||||
assertEquals("BWMGOF5v", call.form().get("sign"));
|
|
||||||
assertEquals("MrBR", call.form().get("websignkey"));
|
|
||||||
assertEquals("downprocess", call.form().get("action"));
|
|
||||||
assertEquals("1", call.form().get("kd"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testExtractPasswordSign() {
|
|
||||||
String html = """
|
|
||||||
<input id="pwd">
|
|
||||||
<script>
|
|
||||||
function down_p(){
|
|
||||||
$.ajax({
|
|
||||||
type : 'post',
|
|
||||||
url : '/ajaxm.php?file=1',
|
|
||||||
data : { 'action':'downprocess','sign':'ABC123','p':'x' }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
""";
|
|
||||||
LzTool.AjaxCall call = LzTool.extractAjaxFromHtml(html, "e4k4");
|
|
||||||
assertNotNull(call);
|
|
||||||
assertEquals("/ajaxm.php?file=1", call.path());
|
|
||||||
assertEquals("ABC123", call.form().get("sign"));
|
|
||||||
assertEquals("e4k4", call.form().get("p"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>0.4.3</revision>
|
<revision>0.4.4</revision>
|
||||||
<java.version>17</java.version>
|
<java.version>17</java.version>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
|
|||||||
Reference in New Issue
Block a user