WebMatrix 3 (preview)

webmatrix 3 preview

WebMatrix3 preview is available for download.

New changes for even simpler website creation

In addition to everything which WebMatrix 2 offers, WebMatrix 3 brings you easy access to your Windows Azure websites. Icon-sized previews of your sites make them easy to find and open. Access your remote sites as seamlessly as local sites. When you need to protect your work or collaborate on team projects, you’ll love our integration of Git and TFS source control systems. These are just a few of the highly requested features we’ve added in WebMatrix 3!
http://www.microsoft.com/web/post/webmatrix-3-preview-how-to-articles

 

Try it out today on http://www.microsoft.com/web/webmatrix/next/

Advertisements

Web Scraping with PowerShell

In PowerShell v3 you have some new useful cmdlets that allow you to download and parse a website.
The code in this post will demonstrate very basic scripts that could get you started with Web Scraping.

If you don’t know if you have PowerShell v3, use this command to find out:

get-host

The first script to get you started with web scraping:

$site = Invoke-WebRequest -UseBasicParsing -Uri www.bing.com
$site.Links | Out-GridView

This will give you all the links from the given website in a gridview.

The next script will give you all the email addresses that are in a mailto: anchor:

$site = Invoke-WebRequest -UseBasicParsing -Uri www.mywebsite.net
$site.Links | foreach {
if ($_.href.ToLower().StartsWith("mailto:")) {
$_.href.SubString(7) | Out-Default
}
}

By coincidence the ‘mywebsite.net’ has anchors using the mailto: prefix.

The last script is a very cool script from StackOverflow where I just modified the url to make sure the script works in several European countries:

function Get-FlightStatus {
     param($query)
$url = "http://www.bing.com?cc=us&q=flight status for $query"
$result = Invoke-WebRequest $url
$result.AllElements |
        Where Class -eq "ans" |
        Select -First 1 -ExpandProperty innerText
}

Use it like this:
(to test you can just paste this after the function in Windows PowerShell ISE )

Get-FlightStatus LH3102

It will give you a result similar to this:

Flight status for Lufthansa 3102 
flightstats.com · 2 minutes ago   

Departing on time at 5:35 PM from HAM 
FROMHAM 
Hamburg5:35 PM 
12/30/2012Terminal 2 
TOVIE 
Vienna7:05 PM 
12/30/2012

PS C:\>

Don’t forget, web scraping can be illegal!

Have fun 😉

Take a look at “Web Scraping with Perl” and the PowerShell tag.

Bing Webmaster Tools updated

I just got this message:

12/04/2011 20:54

Welcome to the new Bing Webmaster Tools.  The site has been redesigned to be easier to use, with an intuitive design organized around three key areas: crawl, index and traffic.  New features, such as Index Explorer and rich charting functionality, provide a comprehensive view into how Bing crawls and indexes your sites.  We’ll continue to add to the Bing Webmaster Tools as we develop new features that empower you to make more informed decisions about your sites but we encourage you to send us your feedback, suggestions and questions to help determine how the site evolves.  Check the Bing Webmaster Blog to stay updated on new features and developments.

Find answers to most of your questions in the help section, which includes links to a Getting Started guide and additional guides on topics such as: site ownership verification, Sitemaps, and the Bing index.  If you still have questions, the Bing Webmaster Forums is a great resource for additional support.

Thanks and welcome,
The Bing Webmaster Team

 

Check out the Bing Webmaster Tools.

[ source ]