Example #1
0
        private void _ParseMeta(TextParser parser)
        {
            var attributes = _ParseAttributes(parser);

            // <meta rel="manifest" href="manifest.json">
            if (attributes.ContainsKey("rel") && attributes["rel"] == "manifest")
            {
                if (!attributes.ContainsKey("href"))
                {
                    return;
                }
                try
                {
                    var uri = new Uri(TargetUri, attributes["href"]);
                    SuggestedScanners.Add(new ManifestJsonScanner(Source, uri));
                }
                catch (UriFormatException) { }
            }

            // <meta name="msapplication-config" content="browserconfig.xml">
            else if (attributes.ContainsKey("name") && attributes["name"] == "msapplication-config")
            {
                if (!attributes.ContainsKey("content"))
                {
                    return;
                }
                try
                {
                    var uri = new Uri(TargetUri, attributes["content"]);
                    SuggestedScanners.Add(new BrowserconfigXmlScanner(Source, uri));
                }
                catch (UriFormatException) { }
            }
        }
Example #2
0
        public override void Start()
        {
            using (var reader = Source.DownloadText(TargetUri))
            {
                if (reader != null)
                {
                    _ParsePage(new TextParser(reader));
                }
            }

            // We add the old standard as the lowest priority.
            SuggestedScanners.Add(new FaviconIcoScanner(Source, TargetUri));
        }