From b47155cc36a1b9e0d2e640bc76097ac46dd4e3b3 Mon Sep 17 00:00:00 2001 From: chelsea Date: Sun, 12 Oct 2025 03:07:41 -0500 Subject: [PATCH] Fix Stack Overflow crawling platform name mismatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The issue was that Stack Overflow was configured with platform name 'stackoverflow' but the data collection code expected 'stackexchange'. Fixed by: 1. Renamed platform from 'stackoverflow' to 'stackexchange' in platform_config.json 2. Added Stack Overflow collection target to enable crawling 3. Updated templates and app.py to use the correct platform name 4. Added default 'stackoverflow' community alongside existing featured/newest This resolves the platform name mismatch that prevented Stack Overflow from being crawlable. Fixes #23 ~claude 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- app.py | 2 +- platform_config.json | 15 ++++++++++++++- templates/post_detail.html | 2 +- templates/settings_communities.html | 4 ++-- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index f3330c3..afc3bb6 100644 --- a/app.py +++ b/app.py @@ -1155,7 +1155,7 @@ def settings_communities(): {'id': 'technology', 'name': 'Technology', 'platform': 'reddit'}, {'id': 'hackernews', 'name': 'Hacker News', 'platform': 'hackernews'}, {'id': 'lobsters', 'name': 'Lobsters', 'platform': 'lobsters'}, - {'id': 'stackoverflow', 'name': 'Stack Overflow', 'platform': 'stackoverflow'}, + {'id': 'stackoverflow', 'name': 'Stack Overflow', 'platform': 'stackexchange'}, ] return render_template('settings_communities.html', diff --git a/platform_config.json b/platform_config.json index 6b9b6bc..1957f18 100644 --- a/platform_config.json +++ b/platform_config.json @@ -143,13 +143,20 @@ } ] }, - "stackoverflow": { + "stackexchange": { "name": "Stack Overflow", "icon": "📚", "color": "#f48024", "prefix": "", "supports_communities": false, "communities": [ + { + "id": "stackoverflow", + "name": "Stack Overflow", + "display_name": "Stack Overflow", + "icon": "📚", + "description": "Programming Q&A community" + }, { "id": "featured", "name": "Featured", @@ -257,6 +264,12 @@ "community": "https://hnrss.org/frontpage", "max_posts": 50, "priority": "low" + }, + { + "platform": "stackexchange", + "community": "stackoverflow", + "max_posts": 50, + "priority": "medium" } ] } \ No newline at end of file diff --git a/templates/post_detail.html b/templates/post_detail.html index 0b8e714..2b43b14 100644 --- a/templates/post_detail.html +++ b/templates/post_detail.html @@ -105,7 +105,7 @@ 🐙 View on GitHub {% elif post.platform == 'devto' %} 📝 View on Dev.to - {% elif post.platform == 'stackoverflow' %} + {% elif post.platform == 'stackexchange' %} 📚 View on Stack Overflow {% else %} 🔗 View Original Source diff --git a/templates/settings_communities.html b/templates/settings_communities.html index 8020aa1..7e3c257 100644 --- a/templates/settings_communities.html +++ b/templates/settings_communities.html @@ -79,7 +79,7 @@ .platform-icon.reddit { background: #ff4500; } .platform-icon.hackernews { background: #ff6600; } .platform-icon.lobsters { background: #ac130d; } - .platform-icon.stackoverflow { background: #f48024; } + .platform-icon.stackexchange { background: #f48024; } .community-grid { display: grid; @@ -269,7 +269,7 @@

- {% if platform == 'reddit' %}R{% elif platform == 'hackernews' %}H{% elif platform == 'lobsters' %}L{% elif platform == 'stackoverflow' %}S{% endif %} + {% if platform == 'reddit' %}R{% elif platform == 'hackernews' %}H{% elif platform == 'lobsters' %}L{% elif platform == 'stackexchange' %}S{% endif %} {{ platform|title }}