Pagetual

Tự động tìm các trang web được phân trang tiếp theo và chèn vào trang hiện tại để cuộn vô hạn. Hỗ trợ hàng ngàn trang web mà không cần bất kỳ quy tắc nào.

< Feedback on Pagetual

Review: Good - script works

Deleted user 1030181
§
Posted: 20-02-2023

这个页面匹配不到(开启调试控制台没有调式信息)
https://www.afreecatv.com/total_search.html?szSearchType=video&szStype=di&szKeyword=faker&szVideoFileType=ALL&rs=1

规则如下:
{
"name": "afreecatv search",
"url": "https://www.afreecatv.com/total_search.html(.*)",
"pageElement": [
"#detailVideoPageList > ul",
"#detailVideoPageList"
],
"action": 1,
"nextLink": "//a[text()='下一页']"
},

hoothinTác giả
§
Posted: 20-02-2023

需要自己构造列表,用 pageElementByJs 插入,构造方法在下面,自己摸索吧。不过你的基础规则也写错了,url 是正则,不是字符串,pageElement 里的选择器应该是 ul#detailVideoPageList,如果用数组,需要和 nextLink 一一对应

var szUrl = SEARCH_SCH_NONE_SCHEME + '/api.php';
        var szType = 'vodSearch';
        var that = this;
        var szActType = $('input[name=szActType]').val();
        var szVideoOrder = $('input[name=szVideoOrder]').val();
        var szTabType = szCurrentPage == 'total' ? 'TOTAL' : 'VOD';
        var szKeyword = $('input[name=szKeyword]').val();
        var nPageNo = $('input[name=nPageNo]').val();
        var szTerm = szCurrentPage == 'total' ? '1year' : $('input[name=szTerm]').val();
        var szVideoFileType = $('input[name=szVideoFileType]').val();
        var szSwitchType = $('input[name=szSwitchType]').val();
        var nListCnt = $('input[name=nListCnt]').val();

        if(nPageNo == ''){
            nPageNo = 1;
        }        

        // 통합검색 탭에서의 기본 값 
        if (szActType == 'total'){
            nListCnt = 4;
            $('div#video_order_sec').show();
            $('div#video_list').show();
            $('div#video_list').append('<p class="loading"><img src="' + RES_AFREECA_NONE_SCHEME + '/images/main_new/loading.gif" alt="" /><br />' + i18next.t('로딩중입니다.') + '</p>');
            nPageNo = 1;
        }

        $.ajax({
            type: 'GET',
            dataType: 'jsonp',
            jsonp: 'callback',
            url: szUrl,
            cache: false,
            data: {
                m: szType,
                v: "4.0",
                szOrder: szVideoOrder,
                szFileType: szVideoFileType,
                szTerm: szTerm,
                szKeyword: encodeURIComponent(szKeyword),
                nPageNo: nPageNo,
                nListCnt: nListCnt,
                tab : szTabType,
                c: szCharSet,
                hl:1,
                location: this.szLocationLog
            },
            success: function (oData, status) {
                oData.list = nListCnt;
                oData.page = nPageNo;
                that.setVideoList(oData);
            },
            error: function (jqXHR, status, errorThrow) {
                if (  $('input[name=szSearchType]').val() != 'total' )
                    that.loadNoResult();
                //if (  $('input[name=szSearchType]').val() == 'total' ) that.loadBjList();
                return;
            }
        });
Deleted user 1030181
§
Posted: 20-02-2023

感谢回复解答~!

Post reply

Đăng nhập để bình luận