This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

UNOFFICIAL incith-google 2.1x (Nov30,2o12)

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
Trixar_za
Op
Posts: 143
Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:

Post by Trixar_za »

Mysticales wrote:Yea saw that later on.

One odd issue tho. How come youtube doesnt work? Also tried Video, that didnt work either.

Another odd thing... I changed how many results it should display (To just 2) but when I went to .rehash it would crash the bot out with a conf error. Not sure why since it was just a single number change.
It helps to paste changes you've made and the errors... Don't assume all of us are having the same issues as you and can reproduce it. My !youtube works fine and I'm using the latest version of the script.
M
Mysticales
Voice
Posts: 26
Joined: Tue Oct 18, 2011 5:33 pm

Post by Mysticales »

Trixar_za wrote:
Mysticales wrote:Yea saw that later on.

One odd issue tho. How come youtube doesnt work? Also tried Video, that didnt work either.

Another odd thing... I changed how many results it should display (To just 2) but when I went to .rehash it would crash the bot out with a conf error. Not sure why since it was just a single number change.
It helps to paste changes you've made and the errors... Don't assume all of us are having the same issues as you and can reproduce it. My !youtube works fine and I'm using the latest version of the script.
Well without any edits. I do !youtube and it just kept saying no videos found. Like if it had a search issue.

As for what I tried to edit (and revert) was just the section that tells how many results to give back on a command. Just the number. Using an Unreal irc server. TCL is 8.4 but dont think that should be a factor in this?
~Battlez-avec la Mystique?~
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Mysticales wrote:Well without any edits. I do !youtube and it just kept saying no videos found. Like if it had a search issue.

As for what I tried to edit (and revert) was just the section that tells how many results to give back on a command. Just the number. Using an Unreal irc server. TCL is 8.4 but dont think that should be a factor in this?
The script is written to support eggdrop 1.6.17/tcl 8.4 and any version on up. It supports utf-8 patching. It supports so much I would rather people read the config.

So, !youtube isn't working. This is known already. Youtube results are set to 0 in the config. Didn't you notice this? Youtube instead has a "custom trigger-phrase" which wraps !yt and !youtube requests instead through as a !google request and adds the phrase "site:youtube.com" to the query. This is clever magic. Custom trigger-phrasing is very powerful.

The list of broken things is as follow:
!images - fixed 100% in my copy
!youtube - haven't even looked at yet
!dailymotion - haven't even looked at yet
!myspace - haven't even looked at yet
!local - partially fixed 50% in my personal copy
!google - investigating/working on, personal copy 60%

There may be some others. But for the most part I know about the above. In the last 3 weeks, for my normal full-time job, I've put in roughly 60hrs week. This leaves none for this project as it is a for free endeavor. It doesn't feed me or buy me clothing. This next upcoming week I shall have several days where I should be able to focus some attention on the things mentioned above.

Here is how you set up the script... Just source it.
__AFTER__ it is sourced, and you have confirmed it works. At this point go ahead and make changes. Most people WILL need to change "use_gzip" variable setting within the config to 0. The script just refuses to work until you do so. So make that change if this is you. Other settings have equal effect, it depends on the platform and the way the bot is compiled. If you _ARE NOT_ utf-8 patched, there are ways to work around this but the settings to do this are not included. You need to ask what they would be. It requires building a list within the encode_strings section of the script and enabling utf8workaround. It's a very complicated attempt to make this all work right for everybody. No matter what country, what language, what platform, etc you use. It is quite damn good at what it does right. ;)

Consider it more, proof-of-concept.. Something to show that it can be done, and a method to implement it as "proof". So until next week, hopefully sooner who knows, when I post again. Remember to be patient. Everything falls into place eventually. Time is our enemy, not me. :)

Code: Select all

    # number of search results/image links to return, 'define:' is always 1 as some defs are huge
    # ------
    variable search_results 3
    variable image_results 4
    variable local_results 4
    variable group_results 3
    variable news_results 3
    variable print_results 3
    variable video_results 4
    variable scholar_results 4
    variable youtube_results 0
    variable locate_results 1
    variable gamespot_results 3
    variable trans_results 1
    variable daily_results 4  
    variable gamefaq_results 20
    variable blog_results 3
    variable ebay_results 3
    variable popular_results 10
    variable rev_results 1
    variable wiki_results 1
    variable wikimedia_results 1
    variable recent_results 10
    variable mininova_results 3
    variable ign_results 3
    variable myspacevids_results 3
    variable trends_results 25
    variable helpbot_results 1
See that big ol stuff up there? To turn a trigger off, set its related "results" setting to 0. See how youtube is up there? Has that 0 next to it. Yeah, youtube is really a custom-trigger phrase crafted to pass thru google. Custom-trigger phrase passing is my "invention" and contribution to the google script.

Code: Select all

    # Custom Trigger Phrasing
    # This is used to customize triggers and for
    # constructing phrases to pass, format is:
    # "custom-trigger:trigger-to-associate-with:phrase-to-pass"
    # within the phrase-to-pass, %search% = the users input.. but,
    # if this is passed onto another custom trigger it will become
    # the enitre phrase which was passed from the trigger before it.
    # hopefully people understand how to use these, and remember
    # to read the lines below this at least twice before
    # constructiong your phrasing...
    # DO NOT USE YOUR COMMAND CHAR IN THESE IT IS ASSUMED.
    # special tcl characters MUST be escaped for you to acheive greatness.
    variable my_customs {
      "ch:g:%search% +site:computerhope.com"
      "eh:g:%search% +site:egghelp.org"
      "mi:g:%search% +site:mircscripts.org"
      "rw:wm:.wiki.roms-isos.com %search%"
      "gw:wm:.wiki.gbatemp.net/wiki %search%"
      "ed:wm:.encyclopediadramatica.ch %search%"
      "un:wm:.uncyclopedia.wikia.com %search%"
      "wq:wm:.en.wikiquote.org/wiki %search%"
      "lw:wm:.lyricwiki.org %search%"
      "wk:wm:.en.wiktionary.org/wiki %search%"
      "bible:wm:.biblewiki.be/wiki %search%"
      "znc:wm:.en.znc.in/wiki %search%"
      "gbr:g:.com.br %search%"
      "got:g:%search% +ext:torrent"
      "rs:g:%search% +inurl:rapidshare"
      "rsmp3 r3 rs3:rs:%search% inurl:mp3"
      "kiczek:gf:%search% in usa"
      "mysite:g:+site:%%1%% +ext:%%2%% %%3-end%%"
      "cg:g:+inurl:%%1%%.craigslist +%%2-end%%"
      "kt:g:%search% +site:kotaku.com"
      "gay:f:%search% +ass +gay vs %search% +vagina -gay"
      "yt:g:%search% site:youtube.com"
      "ts:g:%search% site:twitter.com"
      "ft:wm:.futurama.wikia.com %search%"
      "fg:wm:.familyguy.wikia.com %search%"
      "ad:wm:.americandad.wikia.com %search%"
      "sp:wm:.southpark.wikia.com %search%"
      "sw:wm:.starwars.wikia.com %search%"
      "st:wm:.malf.wikia.com %search%"
      "na:wm:.naruto.wikia.com %search%"
      "in:wm:.inuyasha.wikia.com %search%"
      "gr:wm:.gremlins.wikia.com %search%"
      "wow:wm:.wowwiki.com %search%"
      "smf:wm:.smurfs.wikia.com %search%"
      "sm:wm:.sailormoon.wikia.com %search%"
      "pk:wm:.pokemon.wikia.com %search%"
      "ss:wm:.strawberryshortcake.wikia.com %search%"
      "mlp:wm:.mlp.wikia.com %search%"
      "lps:wm:.lps.wikia.com %search%"
      "ant:wm:.ants.wikia.com %search%"
      "gm:wm:.gaming.wikia.com %search%"
      "nt:wm:.nothing.wikia.com %search%"
      "ff:wm:.finalfantasy.wikia.com %search%"
      "ok:wm:.openkinect.org/wiki %search%"
      "bl:wm:.borderlands.wikia.com %search%"
      "egg:wm:.eggwiki.org %search%"
    }
All of these above are creating more "triggers". If you need help understanding how these work... ASK :)
M
Mysticales
Voice
Posts: 26
Joined: Tue Oct 18, 2011 5:33 pm

Post by Mysticales »

Thanks on the !yt one that one works. =)

As for the other issue I had, Ill try to adjust the values again on results. (I just prefer the bot using 1 line of text for results vs 2) See if it lets me rehash without it crashing out due to a script conflict or whatever it did.

Thanks for the work you do. =) I do wonder tho... why a myspace script... Id suggest make it fresh and current. Go Google+ would think that would fit right in with your Google theme script. =D
~Battlez-avec la Mystique?~
g
goalie204
Halfop
Posts: 44
Joined: Thu Apr 28, 2011 7:31 pm

Post by goalie204 »

hi guys,

love this script, and thank you for updating it :)

!review was working for me until today, no longer works.

Got the new version, still doesn't work, any help appreciated
g
guest
Halfop
Posts: 52
Joined: Mon Jan 19, 2004 4:15 pm

Post by guest »

yeah same for me !review does not work here is what it shows to debug nick when doing !review Halo

(testbot) url (200): http://www.gamespot.com/pages/search/se ... &sort=rank charset: iso8859-1 encode_string: :: Cookie:

(testbot) url (301): http://www.gamespot.com/xbox360/action/ ... index.html
g
goalie204
Halfop
Posts: 44
Joined: Thu Apr 28, 2011 7:31 pm

Post by goalie204 »

<goalie> !review uncharted 3

[secksy(dcc)] [18:24] Tcl error [incith::google::public_message]: can't read "name": no such variable
s
shadrach
Halfop
Posts: 74
Joined: Fri Dec 14, 2007 6:29 pm

Post by shadrach »

Add !news to the list of ceased to function.
M
MePH
Voice
Posts: 5
Joined: Mon Apr 12, 2010 11:03 am

Post by MePH »

translate seems to have died on me here :\
g
goalie204
Halfop
Posts: 44
Joined: Thu Apr 28, 2011 7:31 pm

Post by goalie204 »

ditto re translate
i
iRoc

Post by iRoc »

4:31:22pm / * <iRoc> !ebay assassin
4:31:28pm / * <iB0T> 18,827 results | Assassin's Creed Brotherhood 5-Inch 6 ACTION FIGURE SET..., $59.95Free shipping(Calculate), Buy It Now, 29d 15h 33m @ http://cgi.ebay.com/_W0QQItemZ360427634188 | NM 1982 Gary Numan I Assassin LP Album, $2.99(Calculate), 0 Bids, 4h 15m @ http://cgi.ebay.com/_W0QQItemZ280807470850 | Diablo2_USEAST_​USWEST_EUROPE Softcore Non_Ladder Trap A..., $5.20/$6.20(: $38.99Save 35%</div><div
4:31:30pm / * <iB0T> class="pd"><a onclick="" href="/ctg/Assassins-Creed-Revelations-Playstation-3-2011-/99611564?LH_ItemCondition=1000&_dmd=1&_dmpt=Video_Games_Games&_ipg=&_pcategid=139973&_pcatid=2&_refkw=assassin" target="">128 new</a> from: $37.00</div><div class="pd"><a onclick=""
4:31:34pm / * <iB0T> href="/ctg/Assassins-Creed-Revelations-Playstation-3-2011-/99611564?LH_ItemCondition=4000&_dmd=1&_dmpt=Video_Games_Games&_ipg=&_pcategid=139973&_pcatid=2&_refkw=assassin" target="">66 used</a> from: $34.99</div><div class="pd"><a onclick=""
4:31:38pm / * <iB0T> href="/ctg/Assassins-Creed-Revelations-Playstation-3-2011-/99611564?LH_Auction=1&_dmd=1&_dmpt=Video_Games_Games&_ipg=&_pcategid=139973&_pcatid=2&_refkw=assassin&_sop=1" target="">Next auction</a> ends: $27.00 | <div class="rslp-tm2">6h 30m</div></div><div class="rbr"><div class="RatingBar"><a
4:31:42pm / * <iB0T> href="/ctg/Assassins-Creed-Revelations-Playstation-3-2011-/99611564?_dmd=1&_dmpt=Video_Games_Games&_ipg=&_pcategid=139973&_pcatid=2&_refkw=assassin&_trkparms=65%253A12%257C66%253A2%257C39%253A1%257C72%253A5833&_trksid=p3286.c0.m14#pbe-rvws" title="Rating: 4-5 out of 5" id="v4-49"></a> ( <a
4:31:43pm / * <iRoc> koRn` assassin $37.00
4:31:46pm / * <iB0T> href="/ctg/Assassins-Creed-Revelations-Playstation-3-2011-/99611564?_dmd=1&_dmpt=Video_Games_Games&_ipg=&_pcategid=139973&_pcatid=2&_refkw=assassin&_trkparms=65%253A12%257C66%253A2%257C39%253A1%257C72%253A5833&_trksid=p3286.c0.m14#pbe-rvws" id="v4-50">15 reviews</a> )</div></div>), 0 Bids/Buy It Now, 6h 7m @ http://cgi.ebay.com/_W0QQItemZ260935036069
pls fix this regsub thanks
t
tommytom
Voice
Posts: 16
Joined: Fri Sep 09, 2011 8:28 am

translate fix

Post by tommytom »

change:

Code: Select all

if {[regexp -- {</h3>.*?</object></div>(.+?)</div>} $html - match]} { regsub -all {<.*?>} $match "" match }
to:

Code: Select all

if {[regexp -- {</object>(.+?)<} $html - match]} { regsub -all {<.*?>} $match "" match }
I made it extremely generic (you can use <div at the end if you like), but it looks like there will only ever be one </object> so it should be fine. There might be a better way to do this (it might be catching extra stuff that has to be stripped), but I was getting improper data despite using the same UA and removing some/all of the stripping.

Edit: Just realized the regsub at the end could be stripping that </div> I thought wasn't there anymore and I was right. Here is what you should use:

Code: Select all

if {[regexp -- {</object></div>(.+?)<} $html - match]} { regsub -all {<.*?>} $match "" match }
i
iRoc

Re: translate fix

Post by iRoc »

tommytom wrote:change:

Code: Select all

if {[regexp -- {</h3>.*?</object></div>(.+?)</div>} $html - match]} { regsub -all {<.*?>} $match "" match }
to:

Code: Select all

if {[regexp -- {</object>(.+?)<} $html - match]} { regsub -all {<.*?>} $match "" match }
I made it extremely generic (you can use <div at the end if you like), but it looks like there will only ever be one </object> so it should be fine. There might be a better way to do this (it might be catching extra stuff that has to be stripped), but I was getting improper data despite using the same UA and removing some/all of the stripping.

Edit: Just realized the regsub at the end could be stripping that </div> I thought wasn't there anymore and I was right. Here is what you should use:

Code: Select all

if {[regexp -- {</object></div>(.+?)<} $html - match]} { regsub -all {<.*?>} $match "" match }
tommytom Thanks for the reply
but are you check or just tell?
btw
no need to change any regexp..
just add

Code: Select all

	regsub -all "<.*?>" $results "" results
	regsub -all "<.*?>" $output "" output
	regsub -all "<.*?>" $titem "" titem
	regsub -all "<.*?>" $tresult "" tresult
	regsub -all "<.*?>" $ebcSP "" ebcSP
	regsub -all "<.*?>" $ebcU "" ebcU
	regsub -all "<.*?>" $ebcI "" ebcI
	regsub -all "<.*?>" $ebcBid "" ebcBid
	regsub -all "<.*?>" $ebcPR "" ebcPR
	regsub -all "<.*?>" $ebcTim "" ebcTim
	regsub -all "<.*?>" $ebcShpNew "" ebcShpNew
	regsub -all "<.*?>" $ebcCheck "" ebcCheck
	regsub -all "<.*?>" $no_search "" no_search
	regsub -all "<.*?>" $auctions "" auctions
	regsub -all "<.*?>" $ebcBid2 "" ebcBid2
	regsub -all "<.*?>" $ebcStr "" ebcStr
work fine

output
3:04:21pm / * <iRoc> !ebay assassin
3:04:28pm / * <iB0T> 18,910 results | Muggs Presents the Soul Assassins, Chapter I [PA] by Mu..., $5.99(), 0 Bids, 48m @ http://cgi.ebay.com/_W0QQItemZ360426695831 | ASSASSIN'S CREED 3 Ivory EZIO Figure NECA In Stock Now!, $14.99(), Buy It Now, 15d 7h 13m @ http://cgi.ebay.com/_W0QQItemZ140677749350 | Assassin's Creed: Brotherhood Collectible Jack In The B..., $20.50(: $37.99Save 37%104 new from: $36.0971 used from:
3:04:30pm / * <iB0T> $25.00Next auction ends: $30.00 | 2h 35m ( 15 reviews )), 5 Bids, 1h 23m @ http://cgi.ebay.com/_W0QQItemZ320829522542
t
tommytom
Voice
Posts: 16
Joined: Fri Sep 09, 2011 8:28 am

Post by tommytom »

Yes, it has tons of testing by myself and others over the last 24-48h.
Works fine.

The only thing I couldn't do was get the right sourcecode. Even with the proper UA (AFAIK), I was getting different source than what the eggdrop was getting. I was getting so frustrated that I was about to drop some file writing code in there to get the real source, but then I made some good guesses. Once the regex was cleaner, I could then get the right result and even remove the stripping to see what was in it, so didn't need to go to that extent.
User avatar
Arkadietz
Halfop
Posts: 67
Joined: Fri Jul 14, 2006 11:43 am
Location: cat /dev/zero > /dev/null;

Post by Arkadietz »

[00:11:13] <Kiril> !g meaning above
[00:11:14] <Monica> 1,140,000,000 results | above - definition of above by the Free Online Dictionary, Thesaurus ...</ @ http://www.thefreedictionary.com/above% ... ull,event)

every result looks like this
On a unix system everything is a file ; if something is not a file , it is a proccess.
Post Reply