Commit 49ead83
fix(examples): parse the live API's published timestamps on Python 3.8-3.10
The Search API sends `published` as "2026-09-30 05:04:18 +0000".
datetime.fromisoformat only accepts that on Python 3.11+, so on 3.8-3.10
the company news monitor's live mode stopped at the first real article with
"news item published must be an RFC 3339 timestamp". The checked-in fixtures
use RFC 3339 ("...Z"), so the tests never saw the live format.
Fall back to strptime("%Y-%m-%d %H:%M:%S %z") and test both formats.
Verified against the live API on Python 3.10: before, the error above;
after, 5 matching articles in the report.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 9d68eb1 commit 49ead83
2 files changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
64 | | - | |
65 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
157 | 176 | | |
158 | 177 | | |
159 | 178 | | |
| |||
0 commit comments