• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Downloading html page
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Downloading html page


  • Subject: Re: Downloading html page
  • From: Brendan Younger <email@hidden>
  • Date: Mon, 13 Aug 2001 19:28:24 -0500

On Monday, August 13, 2001, at 02:09 PM, email@hidden wrote:

I wish to download a HTML page from yahoo finance. I have come up with the following code:

NSString *dataAsString;
dataAsString = [NSString stringWithContentsOfURL:[NSURL URLWithString:
@"http://chart.yahoo.com/t?a=02&b=01&c=01&d=02&e=20&f=01&g=d&s=itwo&y=0&z=
itwo"]];
NSLog(dataAsString);


When I try this, nothing is written to the log. If I put another URL, like "http://www.apple.com/quicktime"; in, it works fine, and I get the html written to the log. Can anyone think why this wouldn't work?
Also, if I copy the URL into a browser, I get the correct web page.

Help would be much appreciated.

Drew McCormack
It's a dynamic page and as such there's probably a re-direct or other trickery going on. Their web server probably parses the url and sends a separate stream of HTML from somewhere else. I don't think a simple NSURL will get you what you need.

Brendan Younger


  • Follow-Ups:
    • Re: Downloading html page
      • From: Drew McCormack <email@hidden>
References: 
 >Downloading html page (From: email@hidden)

  • Prev by Date: Re: EOF Advocacy, Open Source?
  • Next by Date: RE: EOF Advocacy, Open Source?
  • Previous by thread: Downloading html page
  • Next by thread: Re: Downloading html page
  • Index(es):
    • Date
    • Thread