0

I'm trying to get some stats from my Halo character onto my desktop. Right now I have a geektool script that turns a service record page into a .png, and then puts that on my desktop. However, I would like it just to display the div class="summary-details"

What would be the best way to do this? I was thinking of writing some kind of python script that would parse the page, copy the necessary style and content sections, then make a new html document every 15 minutes or so. However, I did some research and learned that parsing with regular expressions is not advised. What should I use to parse the page? I'd prefer using something for python. Thanks.

LMNOP
  • 151
  • 6
  • What is your intended end-use for this? To embed in another website? – Jake Aug 20 '12 at 05:07
  • I just wanted to put it on my desktop. I ended up figuring out how to do it, but I kind of cheated. I used imagemagick to crop the png I used to the size and area of the specific thing I wanted, and then put that on my desktop with geektool. It'll all get messed up if the website changes their layout, but I was having a hard time sorting through everything with the parser. If it breaks at least I know how to fix it. – LMNOP Aug 20 '12 at 09:07
  • If they change something with the website there's a good chance they'll have changed the markup too, that would probably break your parser. – Jake Aug 20 '12 at 09:46

1 Answers1

0

Beautiful Soup is well suited for parsing HTML. However it's not going to be easy to produce an image of this div as it appears on the website.

Jake
  • 12,713
  • 18
  • 66
  • 96