1010*/
1111
1212var rule = {
13- title :'爱上你听书网' ,
14- host :'https://www.230ts.net' ,
15- url :'/sort/fyclass/fypage.html' ,
16- searchUrl :'/search.html?searchtype=name&searchword=**&page=fypage' ,
17- searchable :2 ,
18- quickSearch :0 ,
19- headers :{
20- 'User-Agent' :'PC_UA'
13+ title : '爱上你听书网' ,
14+ host : 'https://www.230ts.net' ,
15+ url : '/sort/fyclass/fypage.html' ,
16+ searchUrl : '/search.html?searchtype=name&searchword=**&page=fypage' ,
17+ searchable : 2 ,
18+ quickSearch : 0 ,
19+ headers : {
20+ 'User-Agent' : 'PC_UA'
2121 } ,
22- timeout :5000 ,
22+ timeout : 5000 ,
2323 class_parse : '.nav-ol&&li:gt(0):lt(6);a&&Text;a&&href;.*/(\\w+).html' ,
24- play_parse :true ,
25- lazy :'js:input=input.replace("www","wap")' ,
26- limit :6 ,
27- 推荐 :'#myTab_Content1&&li;.tab-book-title&&Text;*;.tab-book-author&&Text;*' ,
28- 一级 :'ul.list-works&&li;.list-book-dt--span&&Text;.lazy&&data-original;.book-author:eq(2)&&a&&Text;a&&href' ,
29- 二级 :{
30- title :'.book-cover&&alt;.book-info&&dd--span:eq(1)&&Text' ,
31- img :'.book-cover&&src' ,
32- desc :'.book-info&&dd:eq(4)&&Text;;;.book-info&&dd--span:eq(3)&&Text;.book-info&&dd--span:eq(2)&&Text' ,
33- content :'.book-des&&Text' ,
34- tabs :'.playlist-top&&h2' ,
35- lists :'#playlist:eq(#id)&&li' ,
24+ play_parse : true ,
25+ lazy : $js . toString ( ( ) => {
26+ let html = request ( input ) ;
27+ let src = pd ( html , 'iframe#play&&src' , input ) ;
28+ log ( 'src:' + src ) ;
29+ html = request ( src ) ;
30+ const regex = / m p 3 \s * : \s * ' ( [ ^ ' ] + ) ' / ;
31+ const match = html . match ( regex ) ;
32+ if ( match && match [ 1 ] . includes ( 'auth_key' ) ) {
33+ // 替换变量部分为 .mp3.
34+ src = match [ 1 ] . replace ( / ' ( [ ^ ' ] * ) ' \s * \+ \s * [ a - z A - Z _ $ ] [ a - z A - Z 0 - 9 _ $ ] * \s * \+ \s * ' ( [ ^ ' ] * ) ' / , '$1.mp3.$2' ) ;
35+ log ( 'match src:' + src ) ;
36+ }
37+ input = src
38+ } ) ,
39+ limit : 6 ,
40+ 推荐 : '#myTab_Content1&&li;.tab-book-title&&Text;*;.tab-book-author&&Text;*' ,
41+ 一级 : 'ul.list-works&&li;.list-book-dt--span&&Text;.lazy&&data-original;.book-author:eq(2)&&a&&Text;a&&href' ,
42+ 二级 : {
43+ title : '.book-cover&&alt;.book-info&&dd--span:eq(1)&&Text' ,
44+ img : '.book-cover&&src' ,
45+ desc : '.book-info&&dd:eq(4)&&Text;;;.book-info&&dd--span:eq(3)&&Text;.book-info&&dd--span:eq(2)&&Text' ,
46+ content : '.book-des&&Text' ,
47+ tabs : '.playlist-top&&h2' ,
48+ lists : '#playlist:eq(#id)&&li' ,
3649 } ,
37- 搜索 :'*' ,
50+ 搜索 : '*' ,
3851}
0 commit comments