0

I'm quite new in Objective C programming and I'm trying to make an application that returns all the link addresses in HTML page. In that case i shouldn't just parse the HTML, but get these links intercepting them from the page's network request.

Is it possible to intercept the application's network requests or something?

Thanks

  • In what context do you want to intercept the page's network requests? (presenting webview, background, etc). Provide some more details and definitely some code. – Dustin Jul 03 '12 at 13:15

1 Answers1

1

Coincidentally, Ray Wenderlich's rather AWESOME iOS tutorial site posted this article in the last hour. As you are new to iOS/ObjC, I highly recommend reading it thoroughly.

Let’s say you want to find some information inside a web page and display it in a custom way in your app.

This technique is called “scraping.” Let’s also assume you’ve thought through alternatives to scraping web pages from inside your app, and are pretty sure that’s what you want to do.

Well then you get to the question – how can you programmatically dig through the HTML and find the part you’re looking for, in the most robust way possible? Believe it or not, regular expressions won’t cut it!

And before you think Regular Expressions might really be an answer, please read this.

Community
  • 1
  • 1
bbum
  • 162,346
  • 23
  • 271
  • 359