fix: resolve cache markdown crash, inverted viewport ratio, prometheus 500, dead code, and badge URLs#2033
Open
Mohammad-Faiz-Cloud-Engineer wants to merge 4 commits into
Open
Conversation
…s, and cleanup docs emojis - fix(critical): cache markdown dict collapsing causes AttributeError on cached URLs - fix(high): viewport aspect ratio formula was inverted, producing wrong sizes - fix(high): remove unreachable duplicate except block in execute_user_script - fix(medium): remove dead duplicate normalize_url, normalize_url_tmp definitions - fix(medium): remove dead html2text.HTML2Text() instantiation - fix(medium): fix typo fa_user_agenr_generator -> ua_generator - fix(medium): SCREENSHOT_HEIGHT_TRESHOLD -> THRESHOLD with backward compat - fix(medium): remove orphaned adaptive_crawler copy.py - fix(low): fix configure_windows_event_loop import path in docstring - fix(low): remove duplicate exclude_internal_links docstring - fix: complete markdown cache read rewrite to handle all json.loads() outcomes - fix: add type safety in CrawlResult.__init__ for markdown parameter - fix: acache_url MarkdownGenerationResult() Pydantic v2 crash with missing fields - docs: remove decorative emojis from 46 .md files, keep only functional ones
…routes The prometheus_fastapi_instrumentator routing.get_route_name tries to access route.path on all app.routes entries, but Starlette's _IncludedRouter objects (created by app.include_router with prefix=) lack a .path attribute. Monkey-patch _get_route_name to catch AttributeError gracefully, returning 'unknown' for affected routes instead of crashing with HTTP 500.
…stead www.nstproxy.com/logo.svg returns text/html (2MB, full website) instead of an SVG image, breaking the badge in light mode and fallback. Replaced the picture element with a simple img pointing to the known-good gist SVG at gist.githubusercontent.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.
Bugs
values (bool, int) straight to CrawlResult, then StringCompatibleMarkdown
explodes on .raw_markdown access. Missing markdown also triggers Pydantic
validation error. Rewrote the cache read path to handle every json.loads()
outcome safely.
page_height, giving ~4% of the correct height. Fixed to target_width *
page_height / page_width.
lacks .path, crashes the instrumentator middleware before auth runs.
Monkey-patched _get_route_name to return "unknown" instead of throwing.
first except already return. Removed.
Dead code
real one), normalize_url_tmp() (never called), orphaned adaptive_crawler
copy.py, and unused html2text.HTML2Text() init.
Typos
Docs
ones (check marks, warnings, links, locks, shields, brand rocket/robot).
Code blocks preserved.
Badges
Replaced with the working gist URL.
gist.githubusercontent.com URL.