Skip to main content

pagination Scenario 7 — Blog List with Article Detail Extraction

Written by RTILA X Engineering Team

Advanced ~10 min
Prerequisites: pagination/3 pagination/4 pagination/5

What You'll Learn

Extract list pages and detail pages in one workflow

Real-World Use Case

Scraping a blog archive with article details

LIVE DEMO

CRISPR Gene Editing Breakthroughs

New delivery mechanisms are making CRISPR therapies safer and more effective for previously untreatable genetic conditions.

10 Habits for Better Sleep

Small daily routines can dramatically improve sleep quality and long-term health outcomes.

Hidden Gems of Southeast Asia

Beyond the famous temples and beaches, Southeast Asia offers tranquil villages, dramatic landscapes, and rich local culture.

WebAssembly Adoption Trends

WebAssembly is quietly becoming the preferred runtime for performance-critical code in the browser and beyond.

Quantum Computing Progress Report

Quantum computing continues incremental but meaningful progress, with new qubit architectures and error-correction milestones.

Island Hopping in Greece

The Greek islands offer a remarkable diversity of landscapes, history, and food within easy reach of one another.

EXPECTED OUTPUT

RTILA X PROJECT JSON

    {
  "name": "Blog_List_And_Details",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/pagination/7"
    ]
  },
  "datasets": {
    "blog_articles": {
      "item_selector": "css=.blog-post",
      "properties": [
        {
          "name": "title",
          "type": "text",
          "selector": "css=.post-title"
        },
        {
          "name": "excerpt",
          "type": "text",
          "selector": "css=.post-excerpt"
        },
        {
          "name": "article_url",
          "type": "attribute",
          "selector": "css=.post-title a",
          "attribute": "href"
        }
      ]
    },
    "full_article": {
      "item_selector": "css=article",
      "properties": [
        {
          "name": "full_text",
          "type": "text",
          "selector": "css=p"
        },
        {
          "name": "page_url",
          "type": "page_url",
          "selector": ""
        }
      ]
    }
  },
  "commands": [
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=.blog-post"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "blog_articles"
      }
    },
    {
      "command": "for_each",
      "params": {
        "source_type": "dataset",
        "dataset": "blog_articles",
        "as": "item",
        "do": [
          {
            "command": "goto",
            "params": {
              "url": "${item.article_url}"
            }
          },
          {
            "command": "wait_for_selector",
            "params": {
              "selector": "css=.post-title"
            }
          },
          {
            "command": "extract_data",
            "params": {
              "dataset": "full_article"
            }
          },
          {
            "command": "go_back",
            "params": {}
          }
        ]
      }
    }
  ]
}
  

This advanced workflow demonstrates the for_each pattern with go back navigation. After extracting the list, the automation iterates over each extracted row, opens the detail page, pulls the full article, and returns to the list.

Did you complete this scenario?

Ready to run this automation?

Copy the project JSON above, open RTILA X, create a new project, and paste it.

This scenario covers 3 RTILA X commands and is referenced in 2 learning articles.

Continue Learning

Was this helpful?