xyys
xyys
  • 发布:2019-04-17 15:19
  • 更新:2023-11-19 16:37
  • 阅读:5610

最大资源网列表及剧集数据采集

分类:uni-app

zuidazy_list(page){
var pattern = new RegExp('-' + "(.?)" + '.html' +"."+ '_blank">' + "(.?)" + '</a' +"."+ '<span class="xing_vb5">' + "(.?)" + '</span>' +"."+ '<span class="xing_vb(6|7)">' + "(.?)" + '</span>',"g");
let data=[];
uni.request({
method:"GET",
url:'http://zuidazy.net/?m='+page+'.html',
success: (result) => {
if(result.statusCode==200){
// var data = result.data.match(/\/>(.
)\$(.*)<\/li>/g)
while (pattern.exec(result.data) != null){

                        data.push({"id":RegExp.$1,  
                                    "title":RegExp.$2,  
                                    "type":RegExp.$3,  
                                    "times":RegExp.$5});  
                        this.zuidazy_info(RegExp.$1)      
                        // result.push(RegExp.$1);  
                    }  

                }  

            },  
            fail: (e) => {  
                console.log(JSON.stringify(e))  
            }  
        });  
        console.log(data)  
    },  
    zuidazy_info(id){  
        let d1=[];  
        let d2=[];  
        let d3=[];  
        uni.request({  
            method:"GET",  
            url:'http://zuidazy.net/?m='+id+'.html',  
            success: (result) => {  
                if(result.statusCode==200){  
                    var data = result.data.match(/\/>(.*)\$(.*)<\/li>/g)  
                    for(var i=0;i<data.length;i++){  
                        if(data[i].indexOf('.m3u8')>-1){  
                            d1.push(this.getdata(data[i]))  
                        }else if(data[i].indexOf('.mp4')>-1){  
                            d2.push(this.getdata(data[i]))  
                        }else{  
                            d3.push(this.getdata(data[i]))  
                        }  
                    }  

                }  

            },  
            fail: (e) => {  
                console.log(JSON.stringify(e))  
            }  
        });  

        console.log([d1,d2,d3])  
    },  

0 关注 分享

要回复文章请先登录注册

j***@qq.com

j***@qq.com

很好
2023-11-19 16:37