The 2011 Scripting Games Advanced Event 6: Use PowerShell to Get Twitter Names from a Web Page

The 2011 Scripting Games Advanced Event 6: Use PowerShell to Get Twitter Names from a Web Page

  • Comments 3
  • Likes

2011 Scripting Games badge

Summary: Advanced Event 6 in 2011 Scripting Games uses Windows PowerShell to get Twitter names from a web page.

About this event

Division

Advanced

Date of Event

4/11/2011 12:15 AM

Due Date

4/18/2011 12:15 AM

Event scenario

You are getting ready to attend a SQL Saturday event in your area. Prior to the event, you want to ensure that you know who is attending the event so you can leverage your networking opportunities. You discover the networking page and see that it has everyone’s Twitter username listed. After a bit of thought, you decide that it would be cool to have a list of everyone’s Twitter usernames in a text file. To do this, you need to write a script to obtain only the Twitter usernames from the networking site, and write the names to a text file. A sample networking page from one of these events is shown in the following image.

Image of networking page

Sample text file output from the previous page is shown here.

Image of text file

Design points

  • For the purposes of this exercise, use the Columbia, South Carolina networking page for the SQL Saturday #70 (March 19, 2011) event. The URL for the networking page of this event is:
    http://www.sqlsaturday.com/70/networking.aspx
  • If you use a temporary file during the process of obtaining Twitter usernames from the networking page, delete the file prior to completing the script.
  • When you are obtaining the Twitter usernames, do not include an ampersand or twitter.com. Therefore, the Twitter username is ScriptingGuys, not twitter.com/scriptingguys or @ScriptingGuys.
  • Extra points for reusable code
  • Extra points for adding useful Help information, complete with sample usage

2011 Scripting Games links

2011 Scripting Games: All Links on One Page

Submit your scripts on PoshCode

Support our Sponsors!

I invite you to follow me on Twitter and Facebook. If you have any questions, send email to me at scripter@microsoft.com, or post your questions on the Official Scripting Guys Forum. Good luck as you compete in this year’s Scripting Games. We wish you well.

Ed Wilson, Microsoft Scripting Guy

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • The target site is returning a 404 error.

  • @justin

    figures ... the parent site says it is down for maintenance ... bummer ... I a sure it will be back up soon...

  • @Justin

    the site is back up.