feat: use jina ai for web context extraction - #5
Conversation
- Update web-context.go to use r.jina.ai for robust web scraping and md conversion. - Removed outdated HTML parsing logic and image downloading. - Cleaned up go.mod with go mod tidy, removing html-to-markdown dependency. Co-authored-by: Tanq16 <37408906+Tanq16@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…al fallback - Update web-context.go to use r.jina.ai for robust web scraping and md conversion concurrently with the standard local HTML parsing approach. - Prioritize Jina output and fallback to local parsing on failure. - Introduced an `--offline` (`-o`) flag to force local fetching, disabling calls to Jina AI. Co-authored-by: Tanq16 <37408906+Tanq16@users.noreply.github.com>
…al fallback - Update web-context.go to use r.jina.ai for robust web scraping and md conversion concurrently with the standard local HTML parsing approach. - Prioritize Jina output and fallback to local parsing on failure. - Introduced an `--offline` (`-o`) flag to force local fetching, disabling calls to Jina AI. Co-authored-by: Tanq16 <37408906+Tanq16@users.noreply.github.com>
- Added `jina-scraper` subcommand to utilize `r.jina.ai` for robust web context extraction. - Retained original local HTML parsing logic as the default extractor behavior. - Propagated `useJina` flag through the internal handler pipeline to differentiate behavior. Co-authored-by: Tanq16 <37408906+Tanq16@users.noreply.github.com>
This PR updates the web scraping functionality in
ai-contextto use the Jina AI reader API (https://r.jina.ai/). This significantly improves context quality, bypasses paywalls, handles JavaScript rendering, and directly produces markdown, rendering the previous manual HTML parsing and cleanup logic obsolete.Changes:
ProcessWebContentimplementation to utilizer.jina.ai.cleanHTML,findTitle,processImages, etc.github.com/JohannesKaufmann/html-to-markdown/v2andgolang.org/x/net/html) fromgo.modviago mod tidy.PR created automatically by Jules for task 4419090121760230004 started by @Tanq16