Prompt
What's the best way to scrape blog articles?
Latest observation
The best way is usually not to “scrape” in the broad sense, but to collect article content in a way that’s reliable, polite, and allowed by the site.
Best approach
-
Check for an RSS/Atom feed
- Many blogs expose full or partial feeds.
- This is the cleanest and most stable way to get new posts.
-
Check for an official API
- Some platforms (WordPress, Ghost, Medium-like platforms, custom CMSs) provide APIs.
- APIs are far more reliable than scraping HTML.
-
If you must scrape HTML, use the site’s structure carefully
- Fetch the article pages directly.
- Parse the main content with an HTML parser like:
- Python:
BeautifulSoup,lxml,readability-lxml,trafilatura - JavaScript:
cheerio,playwrightif JS-rendered
- Python:
- Avoid brittle selectors that depend on random CSS classes.
Good scraping practices
- Respect robots.txt and terms of service
- Throttle requests so you don’t hammer the site
- Set a clear User-Agent
- Handle pagination and canonical URLs
- Deduplicate articles
- Store metadata like title, author, publish date, tags, URL
- Expect changes and build error handling/retries
Choosing the tool
- Static HTML blog:
requests + BeautifulSouportrafilatura - JavaScript-heavy site:
PlaywrightorSelenium - Large-scale crawling: Scrapy is a strong choice
- Just extracting article text:
trafilaturais often excellent
A practical recommendation
If your goal is to gather blog posts for research, monitoring, or a content archive:
- Use RSS/API first
- Fall back to HTML extraction
- Use Playwright only when necessary
If you want, I can show you:
- a Python example
- a Node.js example
- or a full scraper design for a blog site.
Observation history
Unlock observation history
Create a free Obsurfable account to unlock historical responses, model comparisons, and deeper brand intelligence.
How did Obsurfable measure this prompt?
Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.
Which AI systems does Obsurfable collect answers from?
OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, and Meta AI.