Screen Scrape of www.yahoo.com

This demo illustrates how to perform a screen scrape using the WebClient class. Note that only a few lines of code are needed. (With classic ASP, to perform screen scrapes you needed to use a third-party component.) To view the actual HTML returned by the screen scrape, do a View/Source.


Yahoo Yahoo

  • The Marlins have sued at least nine season ticket holders and vendors

    Earlier this month we reported that the Miami Marlins had sued a season ticket holder, Mickey Axelband, alleging that he reneged on the second year of a two-year season ticket agreement. Axelband, who had been a season ticket holder with the Marlins since their inaugural season in 1993, claimed that the Marlins reneged first, eliminating amenities which they promised upon the move to Marlins Park and failing to deliver on others. In that post we observed that it is uncommon for teams to sue ticket holders.

    NBC Sports
  • Why This Groom Divorced His Bride After One Day

    A bride’s decision to reply to congratulatory text messages from relatives and friends following her wedding ceremony resulted in the demise of her marriage, Gulf News reports. Apparently, the Saudi groom made an attempt to be intimate with his new wife once they were in their hotel room, but she was engrossed in whatever conversations were happening on her phone, and ignored his advances. “Following the marriage ceremony, the groom took his bride to the hotel where they had booked a room,” an anonymous relative told Al Watan, a Saudi publication. “However, as soon as the bride was in the room, she kept using her mobile. Her groom tried to get closer with her and become more intimate, but he

    madamenoire.com
  • It only took Fred Savage co-hosting Live! to get details on Kelly Ripa's sex life

    Well, this should bump up ratings. Fred Savage joined Kelly Ripa as her temporary Live! with Kelly co-host Monday, and things got a little... intimate. During the show, he revealed that although he came to New York alone this time, the last time he was at the hotel where he's staying, he definitely wasn't. "The last time I was at this hotel, we made our first baby at this hotel," he revealed. "So I call my wife, I’m like, 'So you’ll never guess where I am.'" Hilariously, Savage went on the spill some juicy details about that fateful night, revealing that he and his wife were trying to get pregnant and tracking her ovulation. They discovered the time was right, just after they went out on the

    SheKnows
  • Paul McCartney Reveals What Really Split Up the Beatles

    Paul McCartney is now opening up about the tough times after the Beatles split in 1970. After the breakup, McCartney added, he wasn't sure "whether I was still going to continue in music." Fortunately for the music world, he ended up recording upward of 25 studio albums post-Beatles. He dropped his most recent album, "New," in 2013, and he has worked with modern greats like Kanye West, about whom McCartney said, "People says he's eccentric ... which you'd have to agree with.

    Good Morning America
  • After Admitting to Beating This Child, His Babysitter Won't Be Charged for the Craziest Reason

    An Oregon couple dared to go on a date night, leaving their one-year-old son in what they thought were the capable hands of their babysitter.  Instead, when they got home, they heard their child screaming while their babysitter slept on the couch, and the next morning, in the light of day, they saw that their little boy, Jacob, was covered in bruises.  The sitter admitted to abusing Jacob, but the sitter can't be prosecuted due to a ruling in Oregon that states the victim has to be able to definitively prove that the mistreatment was intentional, which is difficult to do when the victim is a baby who can't speak.   Jacob's dad, Joshua Marbury, who is understandably irate that justice won't be

    Redbook
  • Facebook CEO Mark Zuckerberg to raze four homes with views of his house

    Social-media tycoon doesn’t want Palo Alto neighbors peeking into his back yard or master bedroomPriscilla Chan and Mark Zuckerberg don’t want to share too much of their lives with neighbors. The founder and chief executive of Menlo Park, Calif.-based Facebook (FB) disclosed that four homes he’s bought up in the past few years near his own house in Palo Alto, Calif., will be razed and replaced by smaller ones that eliminate the properties’ views of the 32-year-old’s bedroom. According to an application filed with the city’s planning department, the homes that Zuckerberg bought in 2012 and 2013 for more than $43 million along Hamilton Avenue and Edgewood Drive in Palo Alto’s tony Crescent Park neighborhood would be demolished.

    MarketWatch
  • Kid has brilliantly cutting response to a test question

    LONDON - Kids really do have a way with words. UK-based primary school teacher Damith Bandara recently took to Facebook to share an answer one of his children gave on a SATs test question (SATs are the tests 10- and 11-year-olds take before moving on to secondary school).  It's fair to say the kid in question didn't mess around with their response. SEE ALSO: Math test question intended for 7-year-olds stumps parents "One of my children wrote this on the grammar paper," wrote Bandara. "The question was to write the word 'point' as verb and noun. "The answer you see is for the latter! An intelligent response I thought." Bandara's post has been shared more than 4,000 times in the last 20 hours.

    Mashable
  • Syrian coastal cities bombed

    Bomb blasts killed scores of people in the Syrian coastal cities of Jableh and Tartus on Monday, and wounded many others in the government-controlled territory that hosts Russian military bases, monitors and state media said. Islamic State claimed responsibility

    Yahoo News Photo


Source Code:
<%@ Import Namespace="System.Net" %>
<script language="VB" runat="server">
  Sub Page_Load(sender as Object, e as EventArgs)
    'STEP 1: Create a WebClient instance
    Dim objWebClient as New WebClient()


    'STEP 2 and 3
    Const strURL as String = "http://www.yahoo.com/"
    Dim objUTF8 as New UTF8Encoding()
    lblHTMLOutput.Text = objUTF8.GetString(objWebClient.DownloadData(strURL))
  End Sub
</script>

<html>
<body>
  <h1>Screen Scrape of www.yahoo.com</h1>
  <p>
  <asp:label id="lblHTMLOutput" runat="server" />
</body>
</html> 
  


[Return to the Article]