--- name: x-ai-articles description: Scrape high-quality AI long-form articles and threads from X (Twitter) using OpenClaw browser. Generates a daily digest of the most popular AI-related deep dives, threads (🧡), articles, breakdowns, and tutorials sorted by engagement. Triggers: /aix command, "X AI articles", "Twitter AI threads", "AI trending posts", "top AI tweets today", "AIι•Ώζ–‡", "XδΈŠηš„AIζ–‡η« ", or requests for daily AI content digest from X/Twitter. Requires OpenClaw browser with an active X login session (profile=openclaw). --- # X AI Articles Scraper Scrape high-quality, long-form AI articles and threads from X (Twitter) and deliver a curated daily digest. ## Prerequisites - OpenClaw browser with active X/Twitter login (profile=openclaw) - Account: @Clovericbot (joannagrant14@gmail.com) or any logged-in X account ## Workflow ### Step 1: Open X Advanced Search Use the OpenClaw browser (profile=openclaw) to search X with this query template: ``` (AI OR LLM OR AGI OR Claude OR GPT OR OpenAI OR Anthropic OR "coding agent" OR "AI agent") (thread OR 🧡 OR article OR "deep dive" OR "here's what" OR "lessons" OR "breakdown" OR "tutorial" OR "guide" OR "wrote about" OR "published") min_faves:200 since:{YYYY-MM-DD_yesterday} until:{YYYY-MM-DD_today} ``` URL pattern: ``` https://x.com/search?q={URL_ENCODED_QUERY}&src=typed_query&f=top ``` Sort by "Top" tab to get engagement-ranked results. ### Step 2: Extract Posts via Snapshot Take a browser snapshot (not screenshot) of the search results page. Extract from each article element: - **Author**: Display name + @handle - **Content**: Full tweet text (click "Show more" if truncated) - **Engagement**: Likes, reposts, bookmarks, views - **URL**: Construct from `https://x.com/{handle}/status/{status_id}` - **Type**: Thread (🧡), Article, Quote-tweet with article, etc. ### Step 3: Filter for Quality Keep only posts that are **substantive long-form content**: - βœ… Thread/🧡 with educational content - βœ… Article links with analysis - βœ… Deep dives, tutorials, breakdowns, lessons learned - βœ… Product launches with detailed explanations - ❌ One-liner hot takes (even if high engagement) - ❌ Memes, jokes, engagement bait - ❌ Ads / promoted content - ❌ Pure news headlines without analysis ### Step 4: Format Output Output as a ranked list sorted by engagement (views Γ— quality): ``` ## πŸ“– X ηƒ­ι—¨ AI ι•Ώζ–‡ | {date} **1️⃣ {Title/Summary}** @{handle} | ❀️ {likes} | πŸ”– {bookmarks} | πŸ‘οΈ {views} {2-3 sentence summary of the content} https://x.com/{handle}/status/{id} **2️⃣ ... ``` Target: 5-10 high-quality posts per daily digest. ### Step 5: Deliver Send the formatted digest to the user via their preferred channel (Telegram/Discord/etc). ## Adjustable Parameters - **Keywords**: Add domain-specific terms (e.g., "RAG", "fine-tuning", "computer use") - **min_faves**: Lower (100) for niche topics, higher (500) for mainstream - **Time range**: Default is past 24 hours; can be adjusted for weekly digests - **Language**: Add `lang:en` or `lang:ja` filter for language-specific results ## Cron Setup (Optional) To run as a daily automated task, create a cron job with: - Schedule: Daily at a preferred time (e.g., 18:00 local) - Payload: agentTurn with the scraping workflow - Delivery: announce to user's chat ## Troubleshooting - **No results**: Lower min_faves threshold or broaden keywords - **Login required**: Re-authenticate via OpenClaw browser (profile=openclaw) β†’ x.com - **Rate limited**: Wait 5 minutes between searches; X may throttle automated searches