惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
TaoSecurity Blog
TaoSecurity Blog
P
Palo Alto Networks Blog
S
Securelist
C
CXSECURITY Database RSS Feed - CXSecurity.com
Cisco Talos Blog
Cisco Talos Blog
WordPress大学
WordPress大学
S
Schneier on Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
AWS News Blog
AWS News Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Privacy International News Feed
Security Latest
Security Latest
NISL@THU
NISL@THU
Cyberwarzone
Cyberwarzone
I
Intezer
Hugging Face - Blog
Hugging Face - Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
博客园_首页
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
人人都是产品经理
人人都是产品经理
Y
Y Combinator Blog
博客园 - Franky
月光博客
月光博客
GbyAI
GbyAI
G
Google Developers Blog
V2EX - 技术
V2EX - 技术
W
WeLiveSecurity
Google Online Security Blog
Google Online Security Blog
S
Security Affairs
K
Kaspersky official blog
Apple Machine Learning Research
Apple Machine Learning Research
美团技术团队
T
Troy Hunt's Blog
阮一峰的网络日志
阮一峰的网络日志
大猫的无限游戏
大猫的无限游戏
The GitHub Blog
The GitHub Blog
T
Threat Research - Cisco Blogs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - 司徒正美
Cloudbric
Cloudbric
Blog — PlanetScale
Blog — PlanetScale
博客园 - 叶小钗
U
Unit 42
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Check Point Blog
G
GRAHAM CLULEY

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Source Score: Using AI to automate addition of new sources
Amit Singh · 2026-05-11 · via DEV Community

This post is a continuation of a microservice I've been building. You can check out my last post in the series here.


Automate News Source Ingestion with Firecrawl, OpenRouter, and GitHub Actions

TL;DR : I turned a manual, copy‑paste routine for adding news outlets into a fully automated, monthly GitHub Actions workflow. The pipeline scrapes a ranking page with Firecrawl, extracts clean URLs using three free‑tier LLMs on OpenRouter, generates Source YAML files, and opens a PR that lands these sources straight on the live dashboard post merge.


How it all began

When I first ingested sources in source‑score database I seeded it with five manually‑added outlets. It was enough to verify that the endpoints work, but I kept thinking about the “real” world: the top global media brands that people actually read. I wanted the repo to stay fresh without someone constantly creating PRs to add new sources.

The idea was simple on paper: fetch the latest list of popular English‑language news sites, turn each entry into a valid Source document, and let the existing CI validate and ingest them. In practice though, I ran into three big hurdles (which further break down into their own little challenges as you'll see):

  1. Finding a reliable source – I discovered a page on PressGazette website that publishes the top 50 news sites each month, but the raw HTML was going to be a mess.
  2. Extracting just the URLs – The page’s markup mixed headlines, ads, and footnotes. A regular regex wouldn't have been enough.
  3. Keeping the process cheap – I didn’t want to spin up a paid scraper or a paid LLM every month.

The first breakthrough: Firecrawl does the heavy lifting

Firecrawl’s Python SDK made the scraping step painless and their free tier limits are high enough for my requirements. A tiny wrapper takes a URL and returns a clean Markdown:

def main():
    if len(sys.argv) < 2:
        print("Usage: scrape_firecrawl.py URL", file=sys.stderr)
        sys.exit(1)

    url = sys.argv[1]
    api_key = os.getenv("FIRECRAWL_API_KEY")

    fc = Firecrawl(api_key=api_key)
    try:
        doc = fc.scrape(url, formats=["markdown"])
    except Exception as e:
        sys.exit(f"Error scraping {url}: {e}")

    print(doc.markdown)

Enter fullscreen mode Exit fullscreen mode

Running it against the ranking page gives me a tidy Markdown blob that still contains a lot of noise, but it’s a far better starting point than raw HTML. I want to store the scraped content in plaintext and forward it to LLMs as it is. For this requirements, the markdown format seemed the best of all the available options.


Using LLMs to extract news source URLs from the scraped data

Before diving into the technical details, I'd like to add that so far my AI usage was limited to: Claude CLI for high level project management, Copilot VSCode extension for code generation, and various chat services (ChatGPT, Gemini, Kimi, etc) for any questions or learning new stuff. None of them, however, were going to meet my new requirements. This, and the fact that I love free stuff, led me to OpenRouter, and I'm so glad I signed up. Shout out to them for their generous free tier limits and giving people like me the option to use these new, super capable models for free.

Coming back to the main problem, the next step is where OpenRouter shines. I wrote a small helper script that:

  1. Loads a Markdown‑processing skill, that I wrote (using the power of googling) to help the model process MD files, from my repo. I have some other skills there as well that I've been experimenting with to help me write these blogs, maybe I'll cover them later 😉
  2. Sends the scraped Markdown file content to three free models (gemma‑4‑31b‑it, nemotron‑3‑nano‑omni‑30b, gemma‑4‑26b) until one returns a non‑empty answer. Sometimes requests to OpenRouter API fail because the model doesn't respond. To deal with that I'm iterating over these 3 models and so far at least one of them has always worked.
  3. Asks the model to list the top‑10 latest most popular news outlets and output only URLs, one per line.
SOURCE_QUESTION = "What are the top 10 latest most popular news outlets in the world listed in this document? Only output URLs of these news outlets separated by new lines. Do not output anything else."
def process_raw_doc(md_processing_skill: str, md_doc: str, api_key: str) -> str:
    for model in FREE_MODELS_DOC:
        payload = {
            "model": model,
            "messages": [
                {"role": "system", "content": md_processing_skill},
                {"role": "user",
                 "content": f"Here is a web page in Markdown:\n\n{md_doc}\n\n"
                            f"Answer this question:\n{SOURCE_QUESTION}"}
            ],
        }
        raw_source_list = req_openrouter(payload, api_key)
        if raw_source_list:
            break
    if not raw_source_list:
        sys.exit("Error: All models failed.")
    return raw_source_list

Enter fullscreen mode Exit fullscreen mode

The model’s answer still contains stray characters and occasional combined or shortened URLs.

New source URLs on the web page

To get a clean list of URLs, I'm running a second OpenRouter call that uses the built‑in web‑search tool to validate each line and verify the URL is correct. Following is the payload for my second OpenRouter request:

content = (f"Here is a raw list of URLs of news outlets with each line containing one or more unformatted URLs:\n\n"
    f"{raw_source_list}\n\n"
    f"Use web search to access these URLs and discard those that are invalid. Do not scrape the web page, only check if the URL is valid\n"
    "Based on successful web searches, return a list of corresponding properly formatted URLs without any extra test. Keep only one URL per line."
)
payload = {
    "model": model,
    "messages": [
        {
            "role": "user",
            "content": content
        },
    ],
    "tools": [
        {"type": "openrouter:web_search"}
    ]
}

Enter fullscreen mode Exit fullscreen mode


From source URLs to proper Source YAML

With a verified list of URLs in hand, the next step is to generate a full Source document for each outlet. To achieve that goal, yeah you guessed it right, another OpenRouter API call.
I'm adding an ingested source yaml doc as a schema example, then asking the model to fill in the blanks by using the web search tool again:

content = (f"Extract schema from the following yaml document and store it as source_schema:\n\n"
    f"{sample}\n\n"
    f"Following is a list of urls of media outlets separated by new lines\n\n"
    f"{sources}\n\n"
    "Use web search to fetch information about these media outlets and create yaml docs for each of them following the source_schema schema. Do not output anything except for the yaml documents for these medial outlets separated by ---."
)

payload = {
    "model": model,
    "messages": [
        {
            "role": "user",
            "content": content
        },
    ],
    "tools": [
        {"type": "openrouter:web_search"}
    ]
}

Enter fullscreen mode Exit fullscreen mode

The response is a string of YAML manifests separated by ---. I split, filter, and deduplicate against existing files to avoid overwriting anything.


Writing the new files (safely)

The deduplication logic avoids creating ingestion docs for sources that already exist in the repository. It loads every YAML under sources/, compares name and uri, and returns only truly new entries. The final loop writes each doc to a sanitized filename:

for doc_str in unique_src_docs:
    parsed = yaml.safe_load(doc_str)
    filename = parsed.get('name')
    if not filename:
        continue
    filename = re.sub(r"[^A-Za-z0-9._-]+", "-", filename.strip()) + ".yaml"
    path = os.path.join(sources_dir, filename)
    if os.path.exists(path):
        continue
    with open(path, 'w', encoding='utf-8') as f:
        f.write(doc_str.strip() + "\n")

Enter fullscreen mode Exit fullscreen mode

All files land in sources/ ready for the existing validation workflow.


The actual automation: GitHub Actions workflow

Now that we have all the scripts ready, time for the final piece of the puzzle, the scheduled CI job.

  1. It runs on the first day of each month
  2. checks out the repo
  3. creates a new branch
  4. sets up Python
  5. runs a tiny wrapper shell script that strings the three Python helpers together
  6. commits any new YAML files
  7. and opens a PR:

When the PR lands, the existing validate.yml workflow validates the new YAML files, and the post_on_merge.yml workflow posts them to the API when the new source docs get merged, now ready to be fetched by the live dashboard.


The results so far

All the new sources appear with correct URLs and short descriptions, and the CI passes without a hitch. The whole process now takes less than a minute of human time each month, and that too just to merge the PR 😁

Updated live dashboard


What’s next?

Adding sources was the low‑hanging fruit (relatively). The next challenge is to replicate the same pattern for claims and proofs. A larger data set, more complex validation, and a higher chance of model hallucination.

Completing this goal led me to discovering OpenRouter and learning how to use AI agent skills, can't wait to see what the next challenge brings.


Conclusion

By chaining Firecrawl, OpenRouter, and GitHub Actions I turned a tedious, error‑prone task into a reliable, monthly automation. The result is instantly visible on the live dashboard, and the repo stays in sync with the world’s most popular news outlets.
If you try this yourself and have a suggestion or question, feel free to open an issue or drop a comment.

OpenRouter token usage


Further Reading