Repository navigation
Conversation
- consent.py: before a screenshot, click a known consent-manager button or a consent-like button, preferring reject/necessary-only over accept, in the page, its iframes and open shadow roots; hide what is left of fixed consent overlays. #814: banners in 7 -> 0 screenshots - screenshots are JPEG (quality 80) after a 5 s network-idle wait, which also fixes lazily rendered pages; #814 PDF 12.9 -> 6.6 MB - VideoHandler replaces YoutubeHandler: youtu.be, shorts, live, embed, m.youtube and Vimeo; YouTube Data API (with duration) or oEmbed without a key, Vimeo oEmbed; HD thumbnail instead of a screenshot of the player; removed videos fall back to a screenshot - PDFHandler renders the first page with pypdfium2 (issue #1), shows page count and host, also for arxiv /pdf/ links; a download that is not a pdf is treated as a web page - download_image stores any image format as a baseline JPEG (<index>-img.jpg, transparency on white); find_image picks the article picture, older <index>.png caches still work - utm_* parameters are stripped from article and comment links - template: no "..." after articles without text - 24 new tests (55 total) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Phase 3 of docs/PLAN.md. Screenshots showed cookie banners, YouTube links showed a screenshot of the player, PDF links had no picture (issue #1), and the PDFs were 12–13 MB.
What
consent.py): before a screenshot, click a known consent-manager button (OneTrust, Cookiebot, Didomi, Funding Choices, Quantcast, Sourcepoint) or a consent-like button inside a cookie/consent container. Reject / necessary-only is preferred, accept is the fallback. It also searches iframes and open shadow roots (WPConsent), then hides remaining fixed consent overlays.youtu.be,/shorts/,/live/,/embed/,m.youtubeand Vimeo.pypdfium2, with page count and host. arXiv/pdf/links are included, and a download that isn't a PDF is treated as a web page.<index>-img.jpg, transparency on white). Older<index>.pngcaches still work.utm_*parameters are stripped from article and comment links.pypdfium2.Results on #814 (local, Windows)
13 pages had a banner handled: 11 by reject/decline, 2 by accept because those sites only offer accept. Still visible: bot walls on 3–4 sites (noted in PLAN).
Testing
pytest: 55 passed (24 new: video URL variants, durations, Vimeo ids, the PDF/arXiv test,strip_tracking, image conversion,find_image, PDF page rendering).ruff checkandruff format --checkare clean.🤖 Generated with Claude Code