add Google News integration and enhance crawler capabilities
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# duriin_api
|
||||
|
||||
Node.js Fastify server that ingests news articles from RSS, SEC EDGAR 8-K filings, Alpha Vantage News Sentiment, Finnhub company news, GDELT, and configured publisher crawlers into a local SQLite archive.
|
||||
Node.js Fastify server that ingests news articles from RSS, Google News RSS, SEC EDGAR 8-K filings, Alpha Vantage News Sentiment, Finnhub company news, and GDELT into a local SQLite archive.
|
||||
|
||||
## Setup
|
||||
|
||||
@@ -8,7 +8,7 @@ Node.js Fastify server that ingests news articles from RSS, SEC EDGAR 8-K filing
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
2. Edit `config.json` with your API keys, tickers, RSS feeds, crawler settings, and schedules.
|
||||
2. Edit `config.json` with your API keys, tickers, RSS feeds, Google News settings, and schedules.
|
||||
3. Start the server:
|
||||
```bash
|
||||
npm start
|
||||
@@ -303,7 +303,7 @@ Returns ingestion and archive summary information.
|
||||
|
||||
- `image` stores the extracted main image as ultra-compressed base64 WebP.
|
||||
- `normalized_title` is stored for matching and indexing.
|
||||
- `source` may be a shared source like `rss`, `gdelt`, `edgar`, `alphavantage`, or `finnhub`, or a crawler-derived source name for a configured publisher.
|
||||
- `source` may be a shared source like `rss`, `googlenews`, `gdelt`, `edgar`, `alphavantage`, or `finnhub`.
|
||||
- `pub_date` is normalized to ISO-8601 when it can be parsed.
|
||||
- `ingested_at` is the insert timestamp set by the server.
|
||||
|
||||
@@ -311,7 +311,7 @@ Returns ingestion and archive summary information.
|
||||
|
||||
- SQLite archive file defaults to `./archive.sqlite`.
|
||||
- Deduplication is enforced on `url`; normalized titles are stored and indexed for matching but are not unique.
|
||||
- `newsCrawler` reuses `rssFeeds` as the publisher catalog, derives one crawler source per feed label, and supports `disabledLabels` plus per-label `overrides` for seeds and allowed hosts.
|
||||
- `googleNews` accepts `queries`, `topics`, `language`, and `country`, and resolves Google redirect URLs to publisher URLs before ingestion.
|
||||
- Article body extraction runs asynchronously after insertion, with scheduled retries for rows still missing content.
|
||||
- Embeddings are generated asynchronously with OpenRouter `perplexity/pplx-embed-v1-0.6b` and indexed in `sqlite-vec` for similarity search.
|
||||
- Topic search caches normalized query embeddings in SQLite and falls back to OpenRouter on cache miss.
|
||||
|
||||
Reference in New Issue
Block a user