Scott Hanselman

Screen Scraping, Sleep(), Web Services, and the Bible

March 04, 2003 Comment on this post [2] Posted in Web Services | Tools
Sponsored By

I'm trying to help my friend out by automating the task of extracting Bible scriptures off her Watchtower Library CD-ROM. Of course, the data's encrypted so I have no choice but to scrape it. She wants to type a list of citations into Word and have those magically be replaced with the actual scriptures they're referencing. No problemo, I said.

When all else fails, build it yourself. So I read all about EnumWindows keybd_event, GetClipboardData, and friends and started hacking away in C++. It worked and it was much faster than the other tools. I ran into the some timing issues that required scattered calls to Sleep throughout the code, though. When I tried running the program on a different machine, it turned out that the time the script had to sleep at different points needed to be increased. Hmm.

Then I realized that when I finally gave my friend this program, I'd have to modify and recompile it to get it to work on her machine. The last thing she needs is for me to give her a copy of Visual Studio. (Besides, that would be illegal and I never break the law.)
[Injektilo]

Does it strike anyone else as ironic/odd that:

  • The Bible CD people felt the need to Encrypt the Bible on their CD?
  • Also, is it a sin to screen-scrape the bible? :)

And lastly, rather than all this machination why not just call a Bible Web Service?  The wisdom of the ages is just floating out there in the cloud, right?

Check out the programmable Bible: http://www.christianitytoday.com/ct/2003/106/43.0.html
and more importantly http://www.gnpcb.org/esv/share/services/api/.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
March 06, 2003 18:53
An thus spake the Lord thy God to his servants at Watchtower Library:

February 02, 2005 21:49
It's actually not encrypted. It's stored in a binary format and compressed to allow the data to fit on a CD.
MOB

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.