Skip to main content

social-media Scenario 3 — Blog Archive — Extract Titles Then Full Articles

Written by RTILA X Engineering Team

Intermediate ~6 min
Prerequisites: social-media/1 social-media/2

What You'll Learn

Navigate user profiles and extract bio data

Real-World Use Case

Lead generation from social platforms

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.

The Future of Edge Computing in 2025

First paragraph of the full article content.

Second paragraph with additional details.

Third paragraph wrapping up the article.

techguru42 2024-01-15
EXPECTED OUTPUT

RTILA X PROJECT JSON

    {
  "name": "Extract_Blog_Archive",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/social-media/3"
    ]
  },
  "datasets": {
    "archive_entries": {
      "item_selector": "css=.archive-entry",
      "properties": [
        {
          "name": "title",
          "type": "text",
          "selector": "css=.archive-title a"
        },
        {
          "name": "date",
          "type": "text",
          "selector": "css=.archive-date"
        },
        {
          "name": "url",
          "type": "attribute",
          "selector": "css=.archive-title a",
          "attribute": "href"
        }
      ]
    },
    "full_articles": {
      "item_selector": "css=.full-article",
      "properties": [
        {
          "name": "full_title",
          "type": "text",
          "selector": "css=.full-title"
        },
        {
          "name": "author",
          "type": "text",
          "selector": "css=.full-meta .author"
        },
        {
          "name": "date",
          "type": "text",
          "selector": "css=.full-meta .date"
        }
      ]
    }
  },
  "commands": [
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=.archive-entry"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "archive_entries"
      }
    },
    {
      "command": "for_each",
      "params": {
        "source_type": "dataset",
        "dataset": "archive_entries",
        "as": "entry",
        "do": [
          {
            "command": "goto",
            "params": {
              "url": "${entry.url}"
            }
          },
          {
            "command": "wait_for_selector",
            "params": {
              "selector": "css=.full-article"
            }
          },
          {
            "command": "extract_data",
            "params": {
              "dataset": "full_articles"
            }
          }
        ]
      }
    }
  ]
}
  

Archive extraction first collects lightweight index data, then a for_each loop visits each article URL for the full article text.

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 2 RTILA X commands and is referenced in 1 learning article.

Continue Learning

Was this helpful?