Getting Text Off of Site

Discussion in 'iOS Programming' started by Wellington2k, Aug 20, 2011.

  1. Wellington2k, Aug 20, 2011
    Last edited: Aug 20, 2011

    Wellington2k macrumors regular

    Joined:
    Jun 4, 2011
    #1
    Hello again.
    I thought it would be cool if I could get certain text on a site and then print it. Specifically the "This Week's Featured Article" column on http://www.hrwiki.org/wiki/Main_Page

    Is there a way to do that?

    Thanks!
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    Web sites contain copyrighted text and other assets. You aren't allowed to just scrape the data that you want from any old web site. Web sites that want you to be able to download their information will have terms of service that allow this. Often they will have an RSS feed for the purpose.

    Investigate the TOS of any web site that you're interested in and look for RSS or any other API to get the info from the site.

    Aside from that, there are different ways to extract text from a web site including using an xml parser and regex and other screen-scraping methods.
     
  3. Wellington2k, Aug 20, 2011
    Last edited: Aug 20, 2011

    Wellington2k thread starter macrumors regular

    Joined:
    Jun 4, 2011
    #3
    I found a RSS feed "feed://feeds.feedburner.com/HomestarRunner" minus the "". Now how would I get that information to print on a scroll view?
     
  4. Wellington2k thread starter macrumors regular

    Joined:
    Jun 4, 2011
    #5
    That uses XML. I found another one though. Is there a way to only use one view instead of, like, four?
     
  5. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #6
    Yes, RSS uses XML.
     
  6. bredell macrumors regular

    Joined:
    Mar 30, 2008
    Location:
    Uppsala, Sweden
    #7
    Even if the site has a feed you still need to read their terms. Most sites have restrictions on what you are allowed to do with data from the feed.
     
  7. Wellington2k thread starter macrumors regular

    Joined:
    Jun 4, 2011
    #8
    I read it and it doesn't say I can't use it. I've only found RSS Projects with more than one view and they are very complicated. Any help?
     
  8. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #9
    Apple's SeismicXML sample only uses one view.
     
  9. Wellington2k thread starter macrumors regular

    Joined:
    Jun 4, 2011
    #10
    You see only one view but in the project there are more.

    Screen Shot 2011-08-22 at 9.32.14 AM.png

    I know they are all for different parts of the project, but is there a project where it's all in one view?
     
  10. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #11
    I see 4 classes. That absolutely in no way implies more than one view.
     
  11. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #12
    Well, if you can't tell apart the NSObject classes and/or of ViewControllers, might be good to first pickup an Development book, before you try to start XML parsing etc.
    I think it will be faster reading through the book then posting a question and waiting for reply to every question. Just my thought.
     
  12. (marc) macrumors 6502a

    (marc)

    Joined:
    Sep 15, 2010
    Location:
    the woods
    #13
    Hate to bust your bubble but you sound like you should go back to trying to understand the basics. You won't get far by guessing. :)
     
  13. Wellington2k thread starter macrumors regular

    Joined:
    Jun 4, 2011
    #14
    I do know the basics from C++. It is very different. What would be the best book?
     
  14. (marc) macrumors 6502a

    (marc)

    Joined:
    Sep 15, 2010
    Location:
    the woods
    #15
    C++ is not very different from Objective-C, because both are based on C and object-oriented. There are many threads book recommendation threads in this forum, just search around and I'm sure you'll find something. :)
     
  15. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #16
    What has a language got to do with it? Your understanding seems to be lacking on the framework more than the language.
     
  16. Wellington2k thread starter macrumors regular

    Joined:
    Jun 4, 2011
    #17
    Where is the best place to learn about frameworks?
     
  17. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #18

Share This Page