Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Pulling HTML elements from site

$
0
0

Thanks to the forums I have expanded on a basic script that goes out and searches a predefined listing of URL's for several keywords, returning those URLs which contain the defined keywords. 

What I cannot figure out how to do (I have mostly been trying to get Invoke-WebRequest to accomplish this) is go out to these same URL's and pull the HTML elements out and put them into a .csv.  So, for example, I am including a couple of elements from the target website.  From it, I want to pull out the "CVE-ID's", "Date Released" and "Proximity" from the page.  This is the source code from an example page:

    <tr class="t">
            <td class="status">CVE-ID's</td>
            <td>
                <p> CVE-2014-2389 CVE-2014-1956 </p>
            </td>
        </tr>
    <tr class="t">
        <td class="status">Date Released</td>
        <td>
            <p>03 Jul 2014</p>
        </td>
        </tr>
    <tr class="t">
            <td class="status">Proximity</td>
            <td>
                <p> From adjacent network </p>
            </td>
        </tr>

Viewing all articles
Browse latest Browse all 15028

Trending Articles



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