# Jexter Configuration - Get Total Pages ## Using Jexter to Extract the Total Number of Pages in `totalpage_step` **Description:** In the `totalpage_step`, Jexter is utilized to extract the total number of pages from a webpage, which is essential for planning the entire data extraction task. Here are several examples of using Jexter to extract this information, each tailored to different HTML structures. ### Example 1: Directly Locating Pagination Links **HTML Structure:** ```html
``` **Jexter Configuration:** ```json { "elements": { "TotalPageNum": "//div[@class='pagination']//a[5]" } } ``` **Explanation:** This configuration directly targets the last link in the pagination navigation, which usually points to the last page. By using the XPath expression `//div[@class='pagination']//a[5]`, we can directly obtain the text content of this link, which typically contains information about the total number of pages. ### Example 2: Extracting from Pagination Button Text **HTML Structure:** ```html