Как распарсить страницу

Имеется следующий Html код

<html>
<head><script src='https://www.google.com/recaptcha/api.js'></script></head><body>
    <h3>Please <noscript>enable javascript and</noscript> complete CAPTCHA to continue.</h3>
         <form method="post" action="http://free-proxy.cz/verify.php">
            <div class="g-recaptcha" data-sitekey="6Lf-mRITAAAAAN3iIb__XIrQhzgHxm1e8LTFO_uh"></div><input type="submit" />
    </form>

</body>
</html>

Мне из него необходимо получить ссылку http://free-proxy.cz/verify.php и data-sitekey. Использую AngleSharp. Написал два метода

        private string GetSecretKey(IDocument document)
    {
        return document.QuerySelectorAll("div.g-recaptcha > data-sitekey").Select(k=>k.TextContent).First();
    }

    private string VerifyUrl(IDocument document)
    {
        return document.QuerySelectorAll("form > action").Select(k => k.TextContent).First();
    }

Как правильно написать код в QuerySelectorAll?


Ответы (0 шт):