Commit ad3d30a
authored
feat(fetchers): add StackOverflowFetcher for clean Q&A extraction (#64)
## What
Adds a `StackOverflowFetcher` for Stack Overflow and Stack Exchange
network question URLs, returning structured Q&A content via the Stack
Exchange API.
Closes #53
## Why
Coding agents frequently encounter Stack Overflow links. The
DefaultFetcher returns full pages with ads, sidebars, and noise. This
fetcher yields just the signal: question, answers, and votes.
## How
- Matches `stackoverflow.com/questions/{id}` and SE network sites
(serverfault, superuser, askubuntu, *.stackexchange.com)
- Fetches via Stack Exchange API v2.3 with `withbody_markdown` filter
- Returns: question title, body, score, views, tags, author, top N
answers sorted by votes
- Accepted answers marked with indicator
- Format field: `"stackoverflow_qa"`
## Risk
- Low
- Only adds a new fetcher; no changes to existing behavior
### Checklist
- [x] Unit tests passed
- [x] Clippy clean (`-D warnings`)
- [x] Docs build without warnings
- [x] Formatting applied1 parent 0276684 commit ad3d30a
3 files changed
+435
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
124 | | - | |
125 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
| |||
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
| 137 | + | |
134 | 138 | | |
135 | 139 | | |
136 | 140 | | |
| |||
289 | 293 | | |
290 | 294 | | |
291 | 295 | | |
292 | | - | |
| 296 | + | |
293 | 297 | | |
294 | 298 | | |
295 | 299 | | |
296 | 300 | | |
297 | | - | |
298 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
299 | 304 | | |
300 | 305 | | |
301 | 306 | | |
| |||
0 commit comments