Monday, May 24, 2010

Who's good at Computer coding? [scraping?] I have a fun project I am thinking of.?

Whenever DrudgeReport gets a big story, they put a siren on the top of the web site like this: %26lt;IMG SRC="siren.gif"%26gt;. I like to look at the Drudge report fairly often beacuse he is usually one of the first people to get breaking news stories.





My coding is limited to HTML, but by copying and pasting scripts I can do most things I think of (like, for example, refresh a page every minute, etc. )





What scripts could I look into that would check for that code, and then play a WAV file (I thinking foghorn,,,aahoooogga!) whenever the siren comes up? :0)





I have heard of 'scraping' but I don't know how to work with PERL.

Who's good at Computer coding? [scraping?] I have a fun project I am thinking of.?
There aren't any specific scripts for something like this. It's more a less quick script that needs to be custom made. You might find certain tools on screen scraping ( http://en.wikipedia.org/wiki/Screen_scra... ), but based on your description, it's not more than a few lines of code. So pretty much everyone would just program something in a high level language.





You simple need to connect to the webpage, read the data, then use a regular expression or some string searching method for the appropriate HTML tags that indicate a "siren". Then play the sound file if it happens.





Python, Ruby, Perl are all very useful languages for this, because it's easy to write out a fast script that does the above. It's possible to program something like that in C#, Java, C++, and so on, but it takes far less in the first three languages I mentioned.





Today might be the day to expand your knowledge.


No comments:

Post a Comment