en-us/Get-Web_Content_From_Anywhere.walkthru.help.txt

# Get-Web is a wonderfully flexible command. It helps you slice and dice web services and web data into new techology.
# One of the simplest, and most powerful, capbilities of Get-Web is to get all of the tags from a document. For instance, this one liner will grab all of the anchor tags from [start-automating.com](http://start-automating.com).
 
Get-Web -Tag 'a' -Url http://start-automating.com/
 
# It's also simple to get general site metadata.
 
Get-Web -MetaData -Url http://start-automating.com/
 
# You can also extract out HTML5 Microdata from a page. For instance, this one-liner gets everything that IMDB knows about the first movie in it's database.
 
Get-Web -Url "http://www.imdb.com/title/tt0000001/" -AsMicrodata -ItemType http://Schema.org/Movie
 
 
# This one liner helps me make dinner.
 
Get-Web -Url "http://www.myrecipes.com/recipe/veal-and-artichoke-stew-with-avgolemono-10000000226585/" -AsMicrodata -ItemType http://data-vocabulary.org/Recipe
 
 
 
 
# You can also query openGraph.
 
# [OpenGraph](http://developers.facebook.com/docs/reference/api/) is an interesting technology from Facebook that documents objects and their relationships.
 
# It turns all of Facebook via a gigantic RESTful JSON web service.
 
# To interact with this with Powershell Pipeworks, simply use the -AsJson parameter from [Get-Web](http://powershellpipeworks.com/Get-Web-?)
 
# This example gets information about Powershell Pipeworks.
 
 
 
Get-Web -Url "https://graph.facebook.com/250363831747570" -AsJson
 
<#
OpenGraph information can also be embedded within a web page, and extracted directly from that page.
 
 
If a page has OpenGraph data, it often contains a helpful name, image, description.
 
 
This example also shows using the -UseWebRequest parameter, which will use a simple HttpWebRequest object to communicate. By default, Get-Web will try to download things with the xmlHTTP object, which is faster and can impersonate a logon within Internet Explorer.
#>
 
 
Get-Web -Url "http://imdb.com/" -OpenGraph -UseWebRequest
 
 
<#
You can use the -Parameter parameter to call a web service. For instance, this sort script uses Get-Web to call Write-ScriptHTML remotely
#>
 
Get-Web -Url "http://powershellpipeworks.com/Write-ScriptHtml/" -Parameter @{
    "Write-ScriptHTML_Text" = "function Get-Foo() {
    <#
    .Synopsis
        A Sample Script
    .Description
        A Sample Description
    #>
}"
} -UseWebRequest -Method Post