<div dir="ltr">Shane,<div><br></div><div>I read your email with a grin on my face. Scraping, a web page is not a trivial task and any code your write will break as soon as they make a slight change to how the page is displayed or formatted. With that said there are two methods that are used to do this.</div>
<div><br></div><div>1) Write a regex (regular expression) engine. This will execute fast, but will take more time to write.</div><div><br></div><div>2) Use an XML parser. As more and more HTML becomes XML compliant XML parsers will work, but they run very slow as compared to a regex engine.</div>
<div><br></div><div>Both of these approaches will break as soon as the HTML varies from what you expect making the result gobbledygook.</div><div><br></div><div>Here is a link to a Wikipedia page that may be useful: <a href="http://en.wikipedia.org/wiki/Data_scraping">http://en.wikipedia.org/wiki/Data_scraping</a></div>
<div><br></div><div>As is indicated on the Wikipedia page there are APIs that con be found to help with this.</div><div><br></div><div>Here is a link to a Python method of doing it: <a href="http://www.pythonforbeginners.com/python-on-the-web/web-scraping-with-beautifulsoup/">http://www.pythonforbeginners.com/python-on-the-web/web-scraping-with-beautifulsoup/</a></div>
<div><br></div><div>Carl</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 10, 2014 at 11:31 AM, Shane Trent <span dir="ltr"><<a href="mailto:shanedtrent@gmail.com" target="_blank">shanedtrent@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am looking for pointers at attempting what I hope will be a very simple web scraping project. Our elementary school has a newsletter that has every article under a separate link, requiring 15 clicks to read the whole newsletter. Not a great UI experience in my option. Here is an example newsletter.<div>

<br></div><div><a href="http://www.tmsacademy.org/index.php?option=com_content&view=category&id=120&Itemid=553" target="_blank">http://www.tmsacademy.org/index.php?option=com_content&view=category&id=120&Itemid=553</a><br>

</div><div><br></div><div>I would like to find a way to get all of the newsletter content on a single page (and learn a few "teach a man to fish" skills). Pulling into a local document would be acceptable but I would like to be able to share the single page view with other parents at the school. I am not sure of the best way to do this either!</div>

<div><br></div><div>A casual web-search points to Python and a few extensions but most references I found target data harvesting. I wonder if there is a simpler approach. </div><div><br></div><div>I suspect Carl can point me in the right direction but wanted to shout-out to the list on the chance that someone has already done something similar. </div>

<div><br></div><div>Thanks,</div><div>Shane</div><div><br></div><div><br></div></div>
<br>_______________________________________________<br>
Triangle, NC Embedded Computing mailing list<br>
<a href="mailto:TriEmbed@triembed.org">TriEmbed@triembed.org</a><br>
<a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
TriEmbed web site: <a href="http://TriEmbed.org" target="_blank">http://TriEmbed.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>-------------------------------------------------------------------------------<br>Carl J. Nobile (Software Engineer)<br><a href="mailto:carl.nobile@gmail.com">carl.nobile@gmail.com</a><br>
-------------------------------------------------------------------------------
</div>