Skip to main content

social-media Scenario 1 — Hacker News — Extract Top 30 Stories

Written by RTILA X Engineering Team

Beginner ~4 min

What You'll Learn

Extract post content from a social feed

Real-World Use Case

Monitoring brand mentions

LIVE DEMO

1 The Future of Edge Computing in 2025 example1.com 120 points 18 comments
2 How Remote Teams Boost Productivity example2.com 127 points 23 comments
3 CRISPR Gene Editing Breakthroughs example3.com 134 points 28 comments
4 10 Habits for Better Sleep example4.com 141 points 33 comments
5 Hidden Gems of Southeast Asia example5.com 148 points 38 comments
6 WebAssembly Adoption Trends example6.com 155 points 43 comments
7 The Rise of Headless E-Commerce example7.com 162 points 48 comments
8 Quantum Computing Progress Report example8.com 169 points 53 comments
9 Understanding Blood Sugar Control example9.com 176 points 58 comments
10 Island Hopping in Greece example10.com 183 points 63 comments
11 Progress on Autonomous Vehicles example11.com 190 points 68 comments
12 Cultivating a Learning Culture example12.com 197 points 73 comments
13 Battery Technology in 2025 example13.com 204 points 78 comments
14 The Benefits of Intermittent Fasting example14.com 211 points 83 comments
15 Backpacking the Dolomites example15.com 218 points 88 comments
16 The Evolution of Developer Tools example16.com 225 points 93 comments
17 Sustainable Business Models example17.com 232 points 98 comments
18 Understanding Neuroplasticity example18.com 239 points 103 comments
19 Everyday Strategies for Mental Wellness example19.com 246 points 108 comments
20 Exploring the Camino de Santiago example20.com 253 points 113 comments
21 Introduction to Data Mesh example21.com 260 points 118 comments
22 Outsourcing Without Losing Quality example22.com 267 points 123 comments
23 Space Exploration in 2025 example23.com 274 points 128 comments
24 The Gut Microbiome and Health example24.com 281 points 133 comments
25 Urban Exploration in Tokyo example25.com 288 points 138 comments
26 MLOps: From Idea to Production example26.com 295 points 143 comments
27 Building Resilient Supply Chains example27.com 302 points 148 comments
28 Understanding the Immune System example28.com 309 points 153 comments
29 Road Tripping the Norwegian Fjords example29.com 316 points 158 comments
30 Retrieval-Augmented Generation Explained example30.com 323 points 163 comments
EXPECTED OUTPUT

RTILA X PROJECT JSON

    {
  "name": "Extract_Hacker_News_Stories",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/social-media/1"
    ]
  },
  "datasets": {
    "stories": {
      "item_selector": "css=tr.hn-item",
      "properties": [
        {
          "name": "rank",
          "type": "text",
          "selector": "css=.hn-rank"
        },
        {
          "name": "title",
          "type": "text",
          "selector": "css=.hn-title"
        },
        {
          "name": "url",
          "type": "text",
          "selector": "css=.hn-url"
        },
        {
          "name": "points",
          "type": "text",
          "selector": "css=.hn-points"
        },
        {
          "name": "comments",
          "type": "text",
          "selector": "css=.hn-comments"
        }
      ]
    }
  },
  "commands": [
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=tr.hn-item"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "stories"
      }
    }
  ]
}
  

A single dataset can extract an entire list of stories. Each row has stable child selectors for title, domain, points, and comments.

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 2 learning articles.

Continue Learning

Was this helpful?