Repository navigation
Extract app pages and images from web app manifests - #807
Open
Shrashti1234 wants to merge 1 commit into
Open
Shrashti1234 wants to merge 1 commit into
Shrashti1234 wants to merge 1 commit into
Conversation
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.
Implements core web app manifest extraction for #800.
Web app manifests currently fall through to generic string extraction. This can miss extensionless launch/icon URLs and treat descriptive strings such as
example.comas crawl targets.Add
ExtractorWebManifestto extractstart_url,icons[].src,screenshots[].src,shortcuts[].url, andshortcuts[].icons[].src. Resolve URLs against the fetched manifest, use navigation hops for app pages and embed hops for images, and honor the shared outlink limit. Ignore metadata/identity/scope fields, invalid member types, and non-HTTP(S) URLs. Malformed or non-object JSON remains available for fallback extraction.Recognize the manifest MIME type,
.webmanifestURLs, and resources discovered through<link rel="manifest">. Both HTML extractors now preserve that link context and classify manifests as embeds, allowing genericapplication/jsonmanifests to work without claiming unrelated JSON documents. Wire the extractor before generic content extraction in both default XML and Groovy profiles, and document the supported fields and setup for existing jobs.This branch is based directly on master and is independent of #805 and #806.
Validation (JDK 21):
mvn -B -pl docgen,commons,modules,engine -Dtest=ExtractorWebManifestTest,ExtractorHTMLTest,JerichoExtractorHTMLTest,ExtractorJsonTest,ProfileCrawlerBeansTest -Dsurefire.failIfNoSpecifiedTests=false test96 tests passed: 94 extraction tests and 2 default-profile validation tests. Coverage includes HTML → JSON manifest → pages/images with both HTML parsers, correct relative URL resolution and hop types, extensionless resources, MIME/filename recognition, malformed JSON/member types, non-HTTP URLs, and the outlink limit.
Reference: W3C Web Application Manifest.