Quantcast
Channel: htmlagilitypack Forum Rss Feed
Viewing all articles
Browse latest Browse all 655

New Post: How to get content using httpAgilityPack website?

$
0
0
I have a link:http://dictionary.cambridge.org/dictionary/british/appeal, new version have not htmlNode and SelectSingleNode.

Now, I want to get content from this link and I want to get that's results:"a request to the public for money, information, or help".

Source of page:
[TEXT](<span class="sense-body">
<span class="def-block">
    <span class="def-head">
        <span class="def-info"></span>
        <span class="def">

            a 

            <a class="query" title="request" href="http://dictionary.cambridge.org/dictionary/british/request"></a>

             to the 

            <a class="query" title="public" href="http://dictionary.cambridge.org/dictionary/british/public"></a>

             for 

            <a class="query" title="money" href="http://dictionary.cambridge.org/dictionary/british/money"></a>

            , 

            <a class="query" title="information" href="http://dictionary.cambridge.org/dictionary/british/information"></a>

            , or 

            <a class="query" title="help" href="http://dictionary.cambridge.org/dictionary/british/help"></a>

            : 

        </span>
    </span>
    <span class="def-body"></span>
</span>)
[TEXT](string url = "http://dictionary.cambridge.org/dictionary/british/appeal";
    HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
    WebRequest request = WebRequest.Create(url);
    WebResponse response = await request.GetResponseAsync();
    StreamReader stream = new StreamReader(response.GetResponseStream());
    string content = await stream.ReadToEndAsync();

    List<string> list = new List<string>();

    foreach (...)
    {
       ...
    })

Viewing all articles
Browse latest Browse all 655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>