Skip to content

Request Pagetual support for pinglian.lol #1165

@hailou00520

Description

@hailou00520

The url of site
https://pinglian.lol/index.php
https://pinglian.lol/all-videos.php?t=2

Is your request related to a problem? Please describe.
This is a video resource list website with content rendered dynamically via JavaScript. I have tried to write custom rules for this site multiple times, but the auto-pagination function never works properly. The pagination button is a element with only the text "下一页" (meaning "Next Page") and no unique class name for matching. When scrolling to the bottom of the page, the script cannot trigger the next page loading, and the infinite scroll feature cannot be enabled.

Describe the result you'd like with the rule
I hope to achieve full-site infinite scroll auto-pagination support for all list pages of pinglian.lol. When the user scrolls to the bottom of the page, the next page of video list content should be automatically loaded and appended to the bottom of the current list, replacing the original pagination bar. The rule should be compatible with lazy-loaded images on the page, automatically stop loading when reaching the last page with no more content, and work on all paginated list pages of the site.

Custom rule you've tried

[
  {
    "name": "pinglian.lol full site auto pagination",
    "url": "^https?://.*pinglian\\.lol/(?!login|register).*",
    "example": "https://pinglian.lol/all-videos.php?t=2",
    "insertPos": 2,
    "nextLink": "//button[contains(text(),'下一页')]",
    "pageElement": "//div[contains(@class,'grid')]/div",
    "replaceElement": "//div[contains(@class,'flex') and contains(@class,'justify-center')]",
    "wait": 1200,
    "waitElement": [
      "//div[contains(@class,'grid')]/div",
      ".loading"
    ],
    "action": 1,
    "lazyImgSrc": ["data-src", "data-original"],
    "autoLoadNum": 99,
    "stopSign": [
      "//button[contains(text(),'下一页') and @disabled]",
      "//button[contains(text(),'下一页') and contains(@class,'disabled')]",
      "//*[contains(text(),'暂无数据')]"
    ],
    "openInNewTab": true,
    "exclude": "//*[contains(text(),'请登录后使用')]"
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions