forked from dylanbai8/-Reptile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getCanDownlist.js
67 lines (65 loc) · 8.56 KB
/
getCanDownlist.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
ebookId = "15298";
token = $.trim($("#token").val());
str = ""
jQuery.ajax({
type : "post" ,
url : "web/refbook/queryAllChapterList",
dataType : "json" ,
data : {ebookId:ebookId,token:token},
success: (test)=>{
test = test.data.data
console.log(test[0].ebookName + " " + ebookId)
str += '['
for (i of test) {
str += '"http://www.hzcourse.com/resource/readBook?path=' + i.ref + '",'
// var url = "resource/readBook?path="+i.ref;
// jQuery.ajax({
// type : "get" ,
// url : url,
// success: (data)=>{
// console.log(data)
// }
// })
}
str += ']'
console.log(str)
}
});
mmdm = ['1136','1481','1488','1497','1500','1505','1507','1508','1515','1524','1525','1526','1527','1534','1538','1544','1545','1546','1547','1552','1550','1553','1555','1558','1559','1561','1564','1567','1568','1571','1572','1574','1629','1630','1632','1641','1646','1647','1648','1650','1654','1655','1693','1694','1695','1703','1704','1705','1708','13075','13278','13441','13743','14182','14325','14395','14505','14672','14783','14850','14875','14876','14877','14878','14881','14883','14884','14885','14886','14889','14898','14899','14900','14902','14903','14915','14914','14917','14920','14923','14934','14936','14939','14941','14943','14947','14950','14957','14958','14962','14964','14968','14971','14974','14977','14978','14988','14992','14998','14999','15005','15008','15013','15014','15015','15016','15020','15022','15023','15029','15030','15031','15033','15035','15034','15036','15037','15038','15040','15045','15047','15049','15050','15052','15054','15059','15064','15066','15070','15071','15072','15079','15082','15087','15088','15089','15092','15101','15105','15106','15107','15108','15114','15119','15121','15122','15125','15128','15132','15134','15137','15139','15140','15146','15148','15149','15153','15154','15155','15158','15161','15162','15166','15170','15174','15179','15185','15186','15188','15187','15195','15202','15207','15214','15216','15220','15257','15284','15287','15288','15290','15291','15292','15294','15295','15298','15304','15305','15306','15307','15309','15308','15310','15319','15320','15323','15324','15325','15326','15327','15328','15329','15331','15332','15336','15337','15338','15339','15341','15342','15344','15345','15346','15347','15352','15353','15358','15361','15364','15366','15369','15372','15371','15373','15376','15378','15377','15380','15384','15392','15391','15393','15394','15395','15398','15401','15403','15404','15405','15410','15413','15412','15417','15418','15421','15423','15425','15426','15427','15430','15431','15436','15439','15440','15441','15442','15444','15447','15449','15452','15453','15454','15455','15457','15456','15461','15464','15467','15468','15469','15472','15471','15489','15487','15492','15493','15495','15496','15497','15498','15501','15509','15510','15513','15516','15515','15519','15520','15524','15525','15528','15532','15534','15535','15536','15538','15541','15544','15547','15549','15554','15555','15558','15560','15570','15572','15573','15574','15575','15576','15577','15578','15579','15580','15581','15583','15586','15590','15597','15601','15603','15605','15610','15611','15615','15620','15621','15627','15629','15631','15633','15635','15636','15638','15639','15642','15644','15645','15649','15652','15653','15654','15657','15658','15663','15664','15665','15667','15669','15670','15671','15673','15678','15679','15681','15677','15676','15685','15686','15689','15699','15698','15700','15702','15701','15704','15708','15714','15717','15718','15723','15725','15728','15729','15735','15738','15740','15742','15743','15744','15746','15750','15752','15753','15755','15756','15759','15764','15765','15766','15768','15769','15770','15777','15776','15779','15781','15784','15787','15788','15794','15793','15795','15796','15803','15807','15806','15808','15818','15820','15823','15824','15826','15828','15829','15830','15832','15833','15838','15840','15845','15847','15850','15852','15857','15858','15859','15864','15866','15868','15871','15873','15876','15877','15878','15881','15882','15887','15891','15893','15897','15917','15919','15920','15921','15922','15923','15924','15925','15928','15929','15931','15932','15933','15934','15935','15936','15938','15940','15942','15943','15946','15948','15950','15951','15952','15953','15954','15956','15960','15966','15969','15977','15980','15978','15981','15982','15983','15994','15997','16000','16001','16002','16003','16007','16008','16010','16011','16012','16014','16017','16018','16020','16021','16022','16023','16024','16025','16027','15831','16033','16034','16036','16037','16038','16039','16041','16042','16045','16046','16047','16049','16057','16058','16060','16061','16063','16064','16067','16068','16073','16074','16075','16076','16077','16080','16079','16081','16082','16083','16085','16084','16086','16087','16088','16090','16092','16095','16099','16100','16101','16104','16108','16109','16110','16114','16118','16117','16119','16122','16123','16125','16136','16179','16180','16181','16183','16286','16289','16288','16291','16295','16297','16300','16302','16303','16305','16308','16309','16317','16318','16319','16320','16323','16326','16328','16329','16331','16334','16335','16337','16338','16340','16341','16344','16346','16345','16347','16350','16351','16356','16355','16357','16358','16360','16362','16363','16375','16377','16378','16379','16381','16382','16383','16384','16385','16388','16395','16396','16401','16404','16412','16411','16413','16418','16420','16421','16423','16424','16425','16429','16430','16433','16437','16440','16443','16444','16445','16446','16447','16453','16456','16467','16472','16477','16479','16478','16480','16481','16482','16488','16490','16508','16515','16524','16525','16528','16534','16535','16537','16540','16542','16545','16547','16550','16555','16569','16570','16571','16572','16575','16576','16578','16579','16463','16464','17156','17158','17163','17169','17170','17173','17174','17176','17218','17219','17222','17225','17229','17228','17230','17232','17237','17238','17239','17241','17243','17247','17251','17252','17257','17260','17261','17265','17266','17267','17271','17272','17274','17273','17280','17282','17283','17296','17297','17302','17304','17307','17331','17332','17334','17336','17338','17339','17346','17347','17352','17354','17376','17380','17381','17396','17395','17400','17405','17413','17414','17422','17429','17432','17433','17436','17437','17438','17439','17445','17447','17449','17450','17452','17459','17460','17461','17466','17467','17469','17473','17479','17480','17481','17485','17489','17497','17522','17529','17542','17549','17555','17561','17567','17576','17577','17581','17588','17589','17593','17596','17597','17609','17612','17613','17615','17619','17632','17642','17644','17652','17656','17665','17678','17679','17683','17686','17688','17691','17697','17708','17709','17710','17711','17720','17722','17729','17736','17737','17738','17746','17758','17768','17771','17775','17776','17782','17790','17795','17817','17819','17828','17829','17833','17831','17842','17844','17872','17879','17882','17883','17888','17893','17898','17905','17930','17933','17946','17950','17952','17955','17958','17966','17967','17971','17972','17973','17979','17981','17983','17986','17991','17990','17994','17996','18006','18010','18012','18013','18015','18014','18029','18041','18042','18045','18053','18052','18054','18056','18058','18062','18104','18271','18285','18356','18359','18381','18448','18464','18508','18512','18531','18532','18561','18564','18579','18588','18549']
token = $.trim($("#token").val());
out = ""
download = (id) =>{
return new Promise((resolve, reject) =>{
ebookId = id;
str = ""
jQuery.ajax({
type : "post" ,
url : "web/refbook/queryAllChapterList",
dataType : "json" ,
data : {ebookId:ebookId,token:token},
success: (test)=>{
if (test.data.code == 2) {
resolve()
return;
}
test = test.data.data
str += '["' + test[0].ebookName + " " + ebookId + '",'
str += '['
for (i of test) {
str += '"' + i.ref + '",'
}
str += ']],'
out += str
resolve()
}
});
})
}
main = async (a, b) =>{
for (let i = a; i < b; i++) {
console.log(i)
await download(mmdm[i]);
}
}
main(0,mmdm.length)
// http://www.hzcourse.com/resource/readBook?path=