Skip to content
New: Agenty MCP server.

Scrape websites, take screenshots and get datasets right from Claude, ChatGPT, Gemini or Cursor.

Connect your AI

How to scrape next pages when the selector repeated in pagination?

I use a._1f-eo:last selector for the pagination and I’m not sure how many pages there will be, so I want to click on the next page button to go to the next page until it’s disabled. I think this is how the Agenty works.

The problem is that the next page button has the same class as the previous, or numbered page buttons. So I use the :last CSS selector. but it doesn’t works.