HTML to RSS

Discussion in 'Web Design and Development' started by jkarp1, Dec 18, 2011.

  1. jkarp1, Dec 18, 2011
    Last edited: Dec 18, 2011

    jkarp1 macrumors member

    Joined:
    Oct 12, 2011
    Location:
    Australia
    #1
    okay so heres what i want to do, i want to convert this webpage into RSS or grab a RSS feed from it (kinda new at this, not entirely sure on how it all works) but i just want the page converted to RSS so i can eventually have it as a RSS Feed on my desktop with geektool, any online apps or apps in general to do this for me ? or even a manual way i can do it ? i have researched this a bit and found a few answers for pc but nothing for mac :(
     
  2. xtacocorex macrumors regular

    Joined:
    Oct 23, 2010
    Location:
    Iowa
    #2
    You could probably use Python's HTMLParser library to go through the tables in the HTML source to scrape the data.
     
  3. jkarp1 thread starter macrumors member

    Joined:
    Oct 12, 2011
    Location:
    Australia
    #3
    Any directions on how to use it for this particular task ?
     
  4. Hansr macrumors 6502a

    Joined:
    Apr 1, 2007
  5. xtacocorex macrumors regular

    Joined:
    Oct 23, 2010
    Location:
    Iowa
    #5
    I'm working on a solution, need some time to figure it out, creating an HTML parser in Python a little challenging.
     
  6. xtacocorex macrumors regular

    Joined:
    Oct 23, 2010
    Location:
    Iowa
    #6
    Well I have a solution, but it won't work if you use the url you provided. I wrote the code based upon the HTML source grabbed from Opera.

    If you run it with the link you proved, I get garbage, it displays crap in the terminal and can't find the HTML tags. :(

    Need to figure out what is going on.
     
  7. jkarp1 thread starter macrumors member

    Joined:
    Oct 12, 2011
    Location:
    Australia
    #7
    Thats the same issue i came across, seems that the webpage is a different format to most.
     
  8. jkarp1, Dec 18, 2011
    Last edited by a moderator: Jan 21, 2012

    jkarp1 thread starter macrumors member

    Joined:
    Oct 12, 2011
    Location:
    Australia
    #8
    I did get this to work on my desktop with geektool eventually, although i would of preferred to have it done in a more manual way that could be done with any webpage similar to the one i linked, so that i can do it in the future when there isnt a RSS feed supplied, but thankyou for your help, made things a lot more simple this time ;)

    ----------

    Here is what i ended up with, for anyone interested.

    [​IMG]
     
  9. xtacocorex macrumors regular

    Joined:
    Oct 23, 2010
    Location:
    Iowa
    #9
    What is really weird is that the script I wrote for you, works occasionally, but not all the time. It's odd, but there are times where the HTML that Python pulls isn't complete garbage. I have no idea why, but I don't feel right giving you the script since it hardly works perfectly.
     

Share This Page