Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: hm... parsing?

  1. #1
    Regular Coder
    Join Date
    Jan 2012
    Location
    Slovakia
    Posts
    111
    Thanks
    9
    Thanked 0 Times in 0 Posts

    hm... parsing?

    Hi guys :/ I have a rly big problem for me... My classmate asked me if i could help him with one thing on his dad's website. I of course say what u need. And for my suprise i dont know help ... i wasn't expecting this. He wants have the NEWS from http://www.kmss.sk/ website on his website. This website when i am good looking doesnt have a XML RSS.... So. .. what now? :P i was googling all of the day but nothing. I just finded something like parsing? or something like that but ... can somebody send me a great tut for it or ... i dont know something what would help me. I think .. maybe exists something like ... library ? for it, which will parse all the info what i will want and then, when i will have the data in my array i have win ... ah.

  • #2
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,300
    Thanks
    10
    Thanked 283 Times in 282 Posts
    Firstly you might check to see that their usage agreement on the web site allows you to copy the information. By default, it's copyrighted, so unless they say "feel free to copy this", you can't. That might get you off the hook on having to do it

    Secondly, if you do have permission, it's called "screen scraping", if you're googling it. Essentially you'd need to CURL the web page over, and parse through it looking for the news of interest. Not particularly fun stuff, and of course if they change the page, your site is likely to break.

    Dave

  • #3
    Regular Coder
    Join Date
    Jan 2012
    Location
    Slovakia
    Posts
    111
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by tracknut View Post
    Firstly you might check to see that their usage agreement on the web site allows you to copy the information. By default, it's copyrighted, so unless they say "feel free to copy this", you can't. That might get you off the hook on having to do it

    Secondly, if you do have permission, it's called "screen scraping", if you're googling it. Essentially you'd need to CURL the web page over, and parse through it looking for the news of interest. Not particularly fun stuff, and of course if they change the page, your site is likely to break.

    Dave
    hm... ok great link i think i was reading this article in past. But ... one problem ...i parsed the text... but when i want take image which is looking like this-> the source code -> <img src="~/media/SK/Navigation/Main-navigation/Model-Visuals/carPreview_Picanto_2011.jpg?h=153&w=250" alt="" width="250" height="153"/>
    </a> ??? :P can i somehow?

    When it would be normal link i would just add the domain name before but now when i am trying this:

    http://www.kmss.sk/media/SK/Navigati...pg?h=153&w=250

    link to the browser it will not find the file

    Any ideas how to take a image?

  • #4
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,305
    Thanks
    28
    Thanked 276 Times in 270 Posts
    Quote Originally Posted by Trki View Post
    When it would be normal link i would just add the domain name before but now when i am trying this:

    http://www.kmss.sk/media/SK/Navigati...pg?h=153&w=250


    link to the browser it will not find the file
    You omitted a reference to the directory "~" from the URL.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #5
    Regular Coder
    Join Date
    Jan 2012
    Location
    Slovakia
    Posts
    111
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Arbitrator View Post
    You omitted a reference to the directory "~" from the URL.
    hm... sorry? :P didnt understand how did you mean ? :P but solved
    Last edited by Trki; 01-29-2012 at 04:13 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •