Capturing only one <div> of website client side

165 views Asked by At

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.

1

There are 1 answers

1
Jake On BEST ANSWER

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.