Re: [Pygoogle-discuss] First post: hobby pyGoogle script, seeking feedback...
Brought to you by:
bluecoat93
From: Ron S. <rd...@ma...> - 2004-10-31 23:40:48
|
I have uploaded a text file to my web server that is the exact same as my askmerlina.cgi file, except that it is named askmerlina.txt so that you can see it and copy and paste it or download it. If anyone wants the source code (or wants to help me modify the cgi script so that a user can enter their own Google license key instead of using mine (hint hint) ) then just go to www.awaretek.com/askmerlina.txt adn you will have it. Thanks Ron On Oct 31, 2004, at 12:51 PM, Ron Stephens wrote: > Hello. I am new to this list. I hope there is some activity on here? No, there really isn't any activity on this list. :( > I have a (very rough, I admit it) script using pyGoogle that runs on > the command line and can be found on my web site at > www.awaretek.com/plf.html . It takes questions from users and options > to decide amongst. What options are there? What kinds of questions can it answer? > There are also two online CGI versions there that are easy to try out, > first a "simple" one that takes a question and options to choose from > amongst only, then a second more "sophisticated" version that tries to > emulate the full command line version; but it doesn't get as good of > answers yet. I asked "What is the buick six?" and I got this: Traceback (most recent call last): File "/var/www/cgi-bin/askmerlin.cgi", line 351, in ? decide.turntheCrank() File "/var/www/cgi-bin/askmerlin.cgi", line 236, in turntheCrank self.choices = form['choices'].value.split(",") File "/usr/local/python/lib/python2.2/cgi.py", line 550, in __getitem__ raise KeyError, key KeyError: choices > So the command line version (merlina.py) is the one I am hoping > someone from this list might take the time to look at. I need to > refine the CGI versions. > > I am a but a poor coder but it's a fun hobby. I love pyGoogle and > Python. Pleas let me know if you have any suggestions. You can't be that poor if your program actually deciphers natural speech (see START at http://www.ai.mit.edu/projects/infolab/) > Maybe someone can build something better from the ideas I am trying > out? If not, I hope to be able to spend some time during the late > December holidays to refine and improved Ask Merlin, both the command > line version and the CGI versions. Again, see START > By the way, I originally did these scripts using web scraping > techniques, but of course as Google (and then Yahoo, which I switched > to) kept changing things the scripts that once worked kept breaking. > It was way too much work to waste time keeping up with. But now that I > switched to the Google API, it makes a lot more sense ;-)). > > Only problem is, today I already used up all of my 1000 queries, in > debugging my CGI versions of the scripts. ;-((( It looks like your online versions use YOUR personal google developer key, even when someone else is using your script. You should have people enter their own google developer key when they are using Merlin. Your web interface should also give the user some idea of how many queries it will use. > Anyway, don't expect too much, but if anyone looks at the scripts, I'm > eternally grateful Well I won't have time to really look at this until at least November 6th, but I'll be sure to give you some feedback at that point. 30 second response: List has been moribund. Look at effbot.org ElementTree package which has (much better IMO) Google functionality built in. Will try to look at your URL if no one responds before I get 5 minutes. On Sun, 2004-10-31 at 09:51, Ron Stephens wrote: > Hello. I am new to this list. I hope there is some activity on here? > > I have a (very rough, I admit it) script using pyGoogle that runs on > the command line and can be found on my web site at > www.awaretek.com/plf.html . It takes questions from users and options > to decide amongst. > > There are also two online CGI versions there that are easy to try out, > first a "simple" one that takes a question and options to choose from > amongst only, then a second more "sophisticated" version that tries to > emulate the full command line version; but it doesn't get as good of > answers yet. > > So the command line version (merlina.py) is the one I am hoping someone > from this list might take the time to look at. I need to refine the CGI > versions. > > I am a but a poor coder but it's a fun hobby. I love pyGoogle and > Python. Pleas let me know if you have any suggestions. > > Maybe someone can build something better from the ideas I am trying > out? If not, I hope to be able to spend some time during the late > December holidays to refine and improved Ask Merlin, both the command > line version and the CGI versions. > > By the way, I originally did these scripts using web scraping > techniques, but of course as Google (and then Yahoo, which I switched > to) kept changing things the scripts that once worked kept breaking. It > was way too much work to waste time keeping up with. But now that I > switched to the Google API, it makes a lot more sense ;-)). > > Only problem is, today I already used up all of my 1000 queries, in > debugging my CGI versions of the scripts. ;-((( > > Anyway, don't expect too much, but if anyone looks at the scripts, I'm > eternally grateful > > Ron Stephens > > www.awaretek.com/plf.html > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > _______________________________________________ > Pygoogle-discuss mailing list > Pyg...@li... > https://lists.sourceforge.net/lists/listinfo/pygoogle-discuss > |