egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

incith:google :)
Goto page Previous  1, 2, 3, 4, 5, 6 ... 17, 18, 19  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
madwoota
Halfop


Joined: 09 Aug 2005
Posts: 53

PostPosted: Tue Nov 22, 2005 5:03 am    Post subject: Reply with quote

Ok, I've provided an interim fix for this, but I wont be uploading it to the egghelp tcl archive just yet as I have a few others things to fix up before I do that first.

So, here's a temporary fix that will stop the script mangling the search parameters and allow you to search for stuff in quotes.

Ie: if you want to search for an IP directly, you need to enclose it in quotes like so: (as per googles own functionality)

Code:
!g "xxx.xxx.xxx.xxx"


Note: if this breaks anything else, please let me know as I havent had a chance to run a full set of regression testing through it.

Get it here:
Edit: removed, see below.
Back to top
View user's profile Send private message
madwoota
Halfop


Joined: 09 Aug 2005
Posts: 53

PostPosted: Wed Nov 23, 2005 7:54 am    Post subject: Reply with quote

Well isnt that just typical. As soon as I fix one thing, Google go and change their source on me !

So, I've fixed that AND changed the regex structure quite a lot to attempt to cope with future google changes.

Hopefully this will hold us over until the next version in (probably) a couple weeks with a large code cleanup and a few new features Smile

Anyway, heres another interim release (1.7.2) to fix up the broken results the script is now returning.

Get it here:
http://www.woota.net/~madwoota/incith-google-current.tar.gz

Note: I will now keep a single link (above) and just update the script as new releases come about so you can just use that Smile

regards,
-madwoota
Back to top
View user's profile Send private message
SkiZm
Voice


Joined: 24 Nov 2005
Posts: 4

PostPosted: Thu Nov 24, 2005 10:18 pm    Post subject: Reply with quote

madwoota wrote:
Well isnt that just typical. As soon as I fix one thing, Google go and change their source on me !

So, I've fixed that AND changed the regex structure quite a lot to attempt to cope with future google changes.

Hopefully this will hold us over until the next version in (probably) a couple weeks with a large code cleanup and a few new features Smile

Anyway, heres another interim release (1.7.2) to fix up the broken results the script is now returning.

Get it here:
http://www.woota.net/~madwoota/incith-google-current.tar.gz

Note: I will now keep a single link (above) and just update the script as new releases come about so you can just use that Smile

regards,
-madwoota



Thanks for the quick update.

I noticed that the GROUPS search was not working, so I did a test and put some of the old code back in from 1.7. It then worked fine.

Code:

while {$results < $incith::google::group_results} {
        #regexp -- {<td.+?style=.+?width.+?/group/(.+?)/browse_thread/thread/(.+?)/.+?">(.+?)</a>} $html {} group thread desc
        #regsub -- {<td.+?/group/.+?</a>} $html {} html
        regexp -- {<td style="width:(?:.+?)/group/(.+?)/browse_thread/thread/(.+?)/(?:.+?)">(.+?)</a>} $html {} group thread desc
        regsub -- {<td style="width:(.+?)</a>} $html {} html



Hope this helps and thanks again for a quick update.
Back to top
View user's profile Send private message
madwoota
Halfop


Joined: 09 Aug 2005
Posts: 53

PostPosted: Fri Nov 25, 2005 9:42 am    Post subject: Reply with quote

Thats what you get for being too tricky Smile
The problem occurs when you get a "groups matching" result as well.

I fixed with a compromise from the old style to the new way.

I'll revisit this later to clean it up.

So, 1.7.3 is Here
Back to top
View user's profile Send private message
astrali
Voice


Joined: 25 Nov 2005
Posts: 2
Location: Germany

PostPosted: Fri Nov 25, 2005 7:31 pm    Post subject: Reply with quote

hi madwoota!
first thx for the fast updates Very Happy

my problem is: i always get reply's with a -translation- link like that

Code:

<Astrali> !g incith google

<munchBOT> Translate this page @ http://translate.google.com/translate?hl=en&sl=de&u=http://213.133.100.121/index.php?iCurrentItemId=1&iNewsItemId=7&prev=/search?q=incith+google&hl=en&lr=&ie=UTF-8&safe=off&sa=G class=fl | Translate this page @ http://translate.google.com/translate?hl=en&sl=de&u=http://www.shellfire.de/index.php?iCurrentItemId=1345&prev=/search?q=incith+google&hl=en&lr=&ie=UTF-8&safe=off&sa=G class=fl

the server the eggdrop is running on is in germany .. maybe thats the problem?
my language setting is standard value (all) cause most used language in the channels is english

would be nice to get a reply how to fix this problem Smile
got the latest version from your server.

Greetz, Astrali
Back to top
View user's profile Send private message
madwoota
Halfop


Joined: 09 Aug 2005
Posts: 53

PostPosted: Fri Nov 25, 2005 9:30 pm    Post subject: Reply with quote

I was wondering when this issue was going to pop up.
Its caused because Google automatically forwards you on to your local google server based on the host you connect to it from.

Because your server is in germany, Google (thoughtfully) sends you on to google.de, however since most of your query results are in English, Google thinks you will probably want to translate them back to German and gives you lots of those results.

However, the query string used to ask Google for the results was *supposed* to have avoided this situation by using google.com only and not using any local Google servers (although I did consider that at one stage).

I have some theories on avoiding this, so I'll check it out and let you know.
Back to top
View user's profile Send private message
astrali
Voice


Joined: 25 Nov 2005
Posts: 2
Location: Germany

PostPosted: Sat Nov 26, 2005 4:32 am    Post subject: Reply with quote

many thx Very Happy

would be nice if u were able tro fix it!
btw this is the best google script ever.

Greetz, Astrali
Back to top
View user's profile Send private message
RockydotNet
Voice


Joined: 28 Nov 2005
Posts: 1

PostPosted: Mon Nov 28, 2005 11:33 pm    Post subject: Op and/or Voice only Reply with quote

You know what would be nice? If the script had the option to only work for users that are +o and/or +v.

Love the script otherwise. Very Happy
Back to top
View user's profile Send private message
madwoota
Halfop


Joined: 09 Aug 2005
Posts: 53

PostPosted: Wed Nov 30, 2005 3:19 am    Post subject: Re: Op and/or Voice only Reply with quote

RockydotNet wrote:
You know what would be nice? If the script had the option to only work for users that are +o and/or +v.


Presuming you have all of your +o and +v users registered on your bot, you can do this already.
Change the "bind pubm -|-" to "bind pubm -|ov" and .rehash will use the bots internal user flag matching to ensure they have the +o or v flags on that channel.
Course, it *only* works if they're all known by the bot.

You probably actually mean any +v/o without them having to be known on the bot though, so that wouldnt work and I'd have to add something for it Smile
Back to top
View user's profile Send private message
testebr
Halfop


Joined: 01 Dec 2005
Posts: 86

PostPosted: Thu Dec 01, 2005 12:58 pm    Post subject: Reply with quote

I have a problem...

I run this tcl in windrop.

!video << work fine..

!news << work fine..

!images << work fine..

!google << the problem is: Tcl error [incith:google]: can't read "line": no such variable

Any solution for this little problem?

My version:
Quote:
incith:google v1.7.3
Back to top
View user's profile Send private message
madwoota
Halfop


Joined: 09 Aug 2005
Posts: 53

PostPosted: Thu Dec 01, 2005 4:57 pm    Post subject: Reply with quote

testebr wrote:
!google << the problem is: Tcl error [incith:google]: can't read "line": no such variable


As far as I can tell from an initial gloss over, the only way you would be getting that result is if the main google function itself returned absolutely no data at all.
But a part of the function ensures that it would, since thats how you get "No search results found."

Can you provide a little more info ? Eggdrop version, tcl version, country you're in, something that you've searched for that doesnt work etc.
Back to top
View user's profile Send private message
testebr
Halfop


Joined: 01 Dec 2005
Posts: 86

PostPosted: Thu Dec 01, 2005 7:46 pm    Post subject: Reply with quote

Sure, my config:

Code:
#package require http 2.4
source lib/tcl8.4/http2.5/http.tcl
setudef flag google

# 0 will typically disable an option, otherwise a value 1 or
# above will enable it.
#
namespace eval incith {
  namespace eval google {
    # set this to the command character you want to use for the binds
    variable command_char "!"

    # set these to your preferred binds ("one two" - space delimited!)
    variable google_binds "g google"
    variable image_binds "gi image images i"
    variable local_binds "gl local"
    variable group_binds "gg group groups"
    variable news_binds "gn news"
    variable print_binds "gp print"
    variable video_binds "gv video"

    # if you want to allow users to search via private /msg, enable this
    variable private_messages 0

    # as per emailed & forum requests, use the next two variables together
    # to determine the output type like so:
    #  notice_reply 1 & force_private 1 = private notice reply only (this is as requested)
    #  notice_reply 0 & force_private 1 = private msg reply only
    #  notice_reply 1 & force_private 0 = regular channel OR private NOTICE
    #  notice_reply 0 & force_private 0 = regular channel OR private MSG (default)

    # set to 1 to enable a /notice reply instead, 0 for normal text
    variable notice_reply 0
    # set to 1 to force all replies to be private
    variable force_private 0


    # set this to the language you want results in! use 2 letter form.
    #   "all" is the default/standard google.com search.
    #   See http://www.google.com/advanced_search for a list.  You have to use
    #   the 'Language' dropdown box, perform a search, and find a line in the URL
    #   that looks like "&lr=lang_en" (for English). "en" is your language code.
    # Popular Ones: it (italian), da (danish), de (german), es (spanish), fr (french)
    # please note, this does not 'translate', it searches Google in a
    #   language of choice, which means you can still get English results.
    variable language "all"

    # number of search results/image links to return, 'define:' is always 1 as some defs are huge
    variable search_results 4
    variable image_results 4
    variable local_results 4
    variable group_results 3
    variable news_results 3
    variable print_results 4
    variable video_results 4

    # what to use to seperate results, set this to "\n" and it will output each result
    #   on a line of its own. the seperator will be removed from the end of the last result.
    variable seperator " | "

    # ** this is not an optional setting, if a string is too long to send, it won't be sent! **
    # It should be set to the max amount of characters that will be received in a public
    #   message by your IRC server.  If you find you aren't receiving results, try lowering this.
    variable split_length 443

    # trimmed length of returned descriptions, only for standard searches.
    variable description_length 21

    # replace search terms appearing in the description as bolded words?
    variable bold_descriptions 1

    # underline links returned from search results?
    variable underline_links 0

    # number of minute(s) to ignore flooders, 0 to disable flood protection
    variable ignore 1

    # how many requests in how many seconds is considered flooding?
    # by default, this allows 3 queries in 10 seconds, the 4th being ignored
    #   and ignoring the flooder for 'variable ignore' minutes
    variable flood 4:10
  }
}

# end of configuration, script begins


I'm from Brazil and use Windrop latest version in Windows XP Sp2 and tcl version incith:google v1.7.3

Want more some info?

Thanks for help
Back to top
View user's profile Send private message
testebr
Halfop


Joined: 01 Dec 2005
Posts: 86

PostPosted: Sun Dec 04, 2005 10:25 pm    Post subject: Reply with quote

My problem continues...

Quote:
Tcl error [incith:google]: can't read "line": no such variable
Back to top
View user's profile Send private message
Digerati
Voice


Joined: 05 Dec 2005
Posts: 2

PostPosted: Mon Dec 05, 2005 3:48 am    Post subject: Reply with quote

When I do:

Code:
!google continuum


I get the following results:

Quote:
<dBot> The Continuum International Publishing @ http://www.continuumbooks.com/
<dBot> STARTREK.COM @ http://www.startrek.com/
<dBot> Welcome to Continuum, Inc. @ http://www.continuumlasers.com/
<dBot> Subspace Continuum - Freeware Game @ /url?sa=X&revid=1782563160&qpos=0&upos=0&oi=revisions_inline&q=http://beginners.subspace.net/%20

It seems like the reason this happens is because of the "See results for:" addition that Google has at http://www.google.com/search?q=continuum after the third result. Can you please fix the script to work around this? Smile
Back to top
View user's profile Send private message MSN Messenger
madwoota
Halfop


Joined: 09 Aug 2005
Posts: 53

PostPosted: Tue Dec 06, 2005 8:40 am    Post subject: Reply with quote

Hi all, I havent forgotten about you Smile

I had some things to take care of this past week/weekend - namely moving everything out of my house and back in, moving my *entire* computer room from one end of the house ot the other, re-wire the whole house for cat5/tv/cable/etc.

Just look around your dungeon and imagine having to move ALL of it Exclamation

I will be getting back into checking out these things this week and I'll keep you all posted.

regards,
-madwoota
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page Previous  1, 2, 3, 4, 5, 6 ... 17, 18, 19  Next
Page 5 of 19

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber