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
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

I host http.tcl from 8.4 and 8.5 on my website, I upgrade them if/when I upgrade them on my system.

http://incith.com/eggdrop/
K
KristianF
Voice
Posts: 3
Joined: Sun Dec 16, 2007 3:20 pm

Post by KristianF »

oh, I must have missed that part. :oops:

Sorry for that, and thanks for the help.
i
inz
Voice
Posts: 3
Joined: Sun Jan 25, 2009 2:52 pm

Post by inz »

Hi, first of all nice job on the script, have been using it for quite some time now ;)

However i've been having some problems lately when i google a country or something (it seems to happen with "locations" in general).
Here is a bit of output of what happens:
[19:42] <!inz> !g belgium
[19:42] <@AChTUNG> Related searches: belgium daycare? belgium stabbing Search Results Belgium - Wikipedia, the free encyclopedia Straddling the cultural boundary between Germanic and Latin Europe, Belgium is home for two main linguistic groups, the Flemings and the French-speakers, ... en.wikipedia.org/wiki/Belgium - 382k - Cached - Similar pages Belgian Tourist Office - official website - Front Page Belgium (VisitBelgium) is
[19:42] <@AChTUNG> the only official site of the Belgian Tourist offices in the Americas. Everything you want to know about Belgium when planning a ... www.visitbelgium.com/ - 29k - Cached - Similar pages CIA - The World Factbook -- Belgium Features a map and brief descriptions of geography, economy, government, and people. https://www.cia.gov/library/publication ... os/be.html - 117k - Cached - Similar
...
This seems to happen with almost every location like country names, cities and stuff. I think it has something to do with google adding a google maps widget to the result maybe.
I'm using 1.9.9a.

Can you help out?

Thanks, inz
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Incith:Google v1.9.9b .. Have a fun
This should correct most of the problems people are having, hopefully *crosses fingers* There might still be issues here and there every now and then but for the most part in my testing at least these problems seem to have settled...

Also, went ahead and made another script, this one is mainly to show web links titles and shortening before clicking, but can be used for more.
<speechles> !webby http://www.youtube.com/watch?v=s3eqxb1bihs
<sp33chy> YouTube - Gorilla Zoe-Lost(official music video) ( http://tinyurl.com/bfucnt ) ( text/html; charset=utf-8; 96206 bytes )
<sp33chy> The New Gorilla Zoe video lostThis video doesnt havent Lil Wayne in it sorry, unlike the remixDownload mp3 here:http://www.zshare.net/<snipped warez link>/...

<speechles> !webby --xheader --html www.youtube.com --header
<sp33chy> YouTube - Broadcast Yourself. ( http://tinyurl.com/9zza6 ) ( text/html; charset=utf-8; 72292 bytes )
<sp33chy> Server=Apache; Keep-Alive=timeout=300; Expires=Tue, 27 Apr 1971 19:44:06 EST; Date=Wed, 28 Jan 2009 01:05:32 GMT; Content-Type=text/html; charset=utf-8; Content-Length=72302; Connection=Keep-Alive; Cache-Control=no-cache
<sp33chy> X-Content-Type-Options=nosniff
<sp33chy> HTML 4.01 Transitional//EN; Page-Size=72292 bytes; Page-Charset=Unknown; Page-Author=Unknown
<sp33chy> Share your videos with friends, family, and the world

<speechles> !webby http://tinyurl.com/cb5g7h
<sp33chy> egghelp.org community :: View topic - UNOFFICIAL incith-google 1.9.9b (Jan27,2oo8) ( http://tinyurl.com/cb5g7h ) ( text/html; 36914 bytes; 1 redirects )
Just another useless script I wrote to traverse redirects of web links people paste and give the titles of the final page, as well as convert them into a tinyurl. Can also display headers/x-headers and html doctypes using switches as shown above. The switches can be anywhere, before the url, after the url and it won't matter. You can default the switches to 'always on' using the config. Webby .. Most important, have a fun! :P
i
inz
Voice
Posts: 3
Joined: Sun Jan 25, 2009 2:52 pm

Post by inz »

nice job, thanks a lot!
t
tmyoungjr
Voice
Posts: 14
Joined: Fri Aug 24, 2007 3:30 pm

Post by tmyoungjr »

just a request.

can you add encyclopedia dramatica?

it seems to be structured much like wikipedia so i hope it isn't a huge pain to add. and if you can't that is ok too!
t
testebr
Halfop
Posts: 86
Joined: Thu Dec 01, 2005 12:22 pm

Post by testebr »

<user> !wikimedia .encyclopediadramatica.com youtube
<Bot> YouTube | YouTube is a place where every illiterate [censored] on the internet converges on one website. It is also a crappy video site, which was preceded by Break.com in all manners of fugly girls posing, noobs, drag queens posing, fantards, clips from gay animes, old memes, and goth/emo videos. Practically everything in the "most viewed" and "top rated" categories are either softcore porn, clips from
<Bot> [censored] tv shows or sporting events, YouTube Poop, weeaboo faggotry, politically incendiary crap, stupid pet tricks, men measuring their manboobs (HOT!), and let us not forget underage girls shaking their asses on camera. YouTube is pure drama, the entire user base being full of emotional morons who will whine and bitch at th @ http://encyclopediadramatica.com/Youtube

Work with !wikimedia or !wk for search any wikimedia script website based.

And plus, you can add custom trigger for any wiki, like you can see in this line of tcl:

# Custom wiki triggers
# This is used to customize triggers for different wikimedia sites.
# The format is "trigger:wikisite.here"
variable wiki_customs {
"rw:wiki.roms-isos.com"
"gw:wiki.gbatemp.net/wiki"
"ed:encyclopediadramatica.com"
"un:uncyclopedia.org"
"wq:en.wikiquote.org/wiki"
"lw:lyricwiki.org"
"wk:en.wiktionary.org"
}

Search and edit by yourself and rehash your bot conf.
t
tmyoungjr
Voice
Posts: 14
Joined: Fri Aug 24, 2007 3:30 pm

Post by tmyoungjr »

testebr wrote:<user> !wikimedia .encyclopediadramatica.com youtube

Work with !wikimedia or !wk for search any wikimedia script website based.

And plus, you can add custom trigger for any wiki, like you can see in this line of tcl:

# Custom wiki triggers
# This is used to customize triggers for different wikimedia sites.
# The format is "trigger:wikisite.here"
variable wiki_customs {
"rw:wiki.roms-isos.com"

Search and edit by yourself and rehash your bot conf.
wonderful - thanks :)
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

Hey

I have some problems, don't know where to look

When i use !youtube <some name here> The result is "45800 résultats de la recherche de vidéos | Lady Gaga" <--- i don't understand that language.

Any idea where to look?
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Fire-Fox wrote:Hey

I have some problems, don't know where to look

When i use !youtube <some name here> The result is "45800 résultats de la recherche de vidéos | Lady Gaga" <--- i don't understand that language.

Any idea where to look?
It's french. Use !tr <stuff> to find out what it is. This script does have that ability.
<speechles> !tr 45800 résultats de la recherche de vidéos
<sp33chy> Google says: (auto->en) Translation: French (automatically detected) » English >> 45800 results of the search for bones video
Dunno where bones comes in, google translations needs serious work on their end. But anyways, look to the config section of the script for this part.

Code: Select all

    # set debug and administrator here
    # this is used for debugging purposes
    #----------
    variable debug 1
    variable debugnick speechles
They come enabled by default and my nickname is preset. So keep debug as 1, and set your nickname (not mine) as debugnick. After doing this your bot will begin messaging you anytime a trigger has been executed, it should look similar to below.
If you indeed see it like above, then no matter what you set your country, or how you attempt to switch will make it workk. Youtube is using the geographical location of your ip to set the language templates, not following the query but redirecting it appropriately. Which yes, sucks, because this goes against the basic freedom to be out of location in a foriegn country. You will always get their langauge, not your native tongue. There may be another way to query youtube and keep this information intact without them trying to redirect us back to our geo-location. If anyone knows of one, feel free to shout out your finds.
Last edited by speechles on Fri Jan 30, 2009 8:30 pm, edited 1 time in total.
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

Hey

Here is the output

Code: Select all

<LillePil> redirected (302): http://www.youtube.com/results?search_query=lady%20gaga -> http://fr.youtube.com/results?search_query=lady%20gaga :: cookie: use_hitbox=72c46ff6cbcdb7c5585c36411b6b334edAEAAAAw; path=/; domain=.youtube.com; PREF=f1=50000000; path=/; domain=.youtube.com; expires=Tue, 29-Jan-2019 00:28:13 GMT; GEO=b4eccb3ca4e0c9a09fc77e2e432ee667cwwAAAAyRlJbeQaTAB2bg0k=; path=/; domain=.youtube.com; expires=Mon, 02-Feb-2009 00:28:13 GMT;
And yes you wrote it :D

My box is in france :( so that explains it


btw: google prints out in english, and danish ? so i think youtube can to
[01:32:06] [!Apache] !google mirc
[01:32:08] [@LillePil] 16,100,000 Results | mIRC: Internet Relay Chat client @ http://www.mirc.com/ | mIRC: Download mIRC @ http://www.mirc.com/get.html | mIRC - Wikipedia, the free encyclopedi @ http://en.wikipedia.org/wiki/MIRC | www.mirc.org ? Index Page. @ http://www.mirc.org/
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Fire-Fox wrote:btw: google prints out in english, and danish ? so i think youtube can to
[01:32:06] [!Apache] !google mirc
[01:32:08] [@LillePil] 16,100,000 Results | mIRC: Internet Relay Chat client @ http://www.mirc.com/ | mIRC: Download mIRC @ http://www.mirc.com/get.html | mIRC - Wikipedia, the free encyclopedi @ http://en.wikipedia.org/wiki/MIRC | www.mirc.org ? Index Page. @ http://www.mirc.org/
Sure, google isn't redirecting you from the server you've chosen to a local one (geo-locating). Check your bots debug messages. The only site within this script doing that is youtube and it has happened recently doing this. I've got a small work-around implemented to let them do their redirecting all they want. It will then use the language tag markers within the query to choose the template for the language you've chosen. This appears to work but I'm not sure if this will affect results given. If all content is mirrored onto all servers, this shouldn't affect your results. But if content on .com is unique to content on .fr then this most certainly will affect results... :cry:
<sp33chy> redirected (302): http://fr.youtube.com/results?search_qu ... drop&hl=fr -> http://www.youtube.com/results?search_q ... drop&hl=fr :: cookie: use_hitbox=72c46ff6cbcdb7c5585c36411b6b334edAEAAAAw; path=/; domain=.youtube.com; GEO=e9d4ac3157557f31a75e17b969f3aa70cwwAAAAyVVNG5/m1AAV7hEk=; path=/; domain=.youtube.com; expires=Mon, 02-Feb-2009 16:23:33 GMT;
<sp33chy> url (200): http://www.youtube.com/results?search_q ... drop&hl=fr charset: utf-8 encode_string: iso8859-1 :: cookie: use_hitbox=72c46ff6cbcdb7c5585c36411b6b334edAEAAAAw; path=/; domain=.youtube.com; GEO=e9d4ac3157557f31a75e17b969f3aa70cwwAAAAyVVNG5/m1AAV7hEk=; path=/; domain=.youtube.com; expires=Mon, 02-Feb-2009 16:23:33 GMT
Notice the GEO cookie above, yep, thats causing our redirect and without it comes endless redirects. So the work around as you see is the language modifier passed (&hl=).
Even tho youtube is redirecting to a local server, you will still get the language of your choice.
Incith:Google v1.9.9c .. Have a fun :P
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

seems to work :D
[18:29:00] [@LillePil] 46,400 video results | Lady GaGa - Just Dance (Music video by Lady GaGa performing Ju) (4:20; 1 week ago; 913,184 views) @ http://youtube.com/watch?v=8nxHE78yEjo&hl=en&fmt=18 | Lady GaGa - Poker Face (Music video by Lady GaGa performing Po) (4:20; 1 week ago; 556,173 views) @ http://youtube.com/watch?v=cQ5uCfwK6qw&hl=en&fmt=18 | Lady GaGa - Just Dance (Music video by Lady GaGa
[18:29:03] [@LillePil] performing Ju) (4:20; 9 months ago; 33,713,400 views) @ http://youtube.com/watch?v=M65zI9LH-as&hl=en&fmt=18 | Lady GaGa: Poker Face (Official Music (DOWNLOAD RINGTONE NOW: http://tinyurl.co) (4:20; 1 month ago; 13,186,808 views) @ http://youtube.com/watch?v=xyDRbp1ZPp8&hl=en&fmt=18 | Lady GaGa Ft Colby O'Donis - Just Danc (DOWNLOAD RINGTONE -? http://tinyurl.com/) (4:20; 1 month ago; 2,558,758
[18:29:07] [@LillePil] views) @ http://youtube.com/watch?v=ftNPQqzQ9u0&hl=en&fmt=18
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

Working, here are some addons if you want them :D

First off all thanks for this awesome script :)

Find this (Google section)

Code: Select all

# we need this to keep blogsearch results from appearing in our zipcodes, trust me, need this ;) 


Right above replace with below code

Code: Select all

      regsub -all -- {<(.+?)>} $match {} match
      # format output according to variables.
      if {$incith::google::total_results != 0 && $match > 0 && $spell == 0} {
        set output "\0037\[Google Rusults\]\003 \002${match}\017 [descdecode $titem]${incith::google::seperator}"
        if {$incith::google::bold_descriptions == 0} {
          regsub -all -- "\002" $output {} output
        }
      } 
Prints out :
[@LillePil] [Google Rusults] 5,420,000 Results | RoboCop (1987) @ http://www.imdb.com/title/tt0093870/ | RoboCop (2010) @ http://www.imdb.com/title/tt1234721/ | RoboCop - Wikipedia, the free encyclop @ http://en.wikipedia.org/wiki/Robocop | Video results for robocop @ http://video.google.com/videosearch?q=robocop
Find this (YouTube section)

Find

Code: Select all

set titen "results"
Right under you have

Code: Select all

 # format output according to variables.
      if {$match != ""} {
        set output "\002${match}\002 ${titen}${incith::google::seperator}"
        if {$incith::google::bold_descriptions == 0} {
          regsub -all -- "\002" $output {} output
        }
      }
Replace it with

Code: Select all

      # format output according to variables.
      if {$match != ""} {
        set output "\0037\[YouTube\]\003 \002${match}\002 ${titen}${incith::google::seperator}"
        if {$incith::google::bold_descriptions == 0} {
          regsub -all -- "\002" $output {} output
        }
      }
Prints out:
[@LillePil] [YouTube] 11,100 video results | Original 1987 Trailer for Robocop
Find this (Book section)

Code: Select all

while {$results < $incith::google::print_results} {
Right above replace with

Code: Select all

      regsub -all -- {<(.+?)>} $match {} match
      # format output according to variables.
      if {$incith::google::total_results != 0 && $match > 0} {
        set output "\0037\[Book Rusults\]\003\002 ${match}\017 $titem${incith::google::seperator}"
        if {$incith::google::bold_descriptions == 0} {
          regsub -all -- "\002" $output {} output
        }
      }
Prints out :
[@LillePil] [Book Rusults] 3,900 Books | Harry Potter and the Sorcerer's Stone? (by J. K. Rowling - Juvenile Fiction - 2003 - 309 pages)
Find this (Image section)

Code: Select all

while {$results < $incith::google::image_results} {
Replace the above with

Code: Select all

regsub -all -- {<(.+?)>} $match {} match
      # format output according to variables.
      if {$incith::google::total_results != 0 && $match > 0} {
        set output "\0037\[Image Rusults\]\003\002 ${match}\017 $titem${incith::google::seperator}"
        if {$incith::google::bold_descriptions == 0} {
          regsub -all -- "\002" $output {} output
        }
      }
Prints out :
[@LillePil] [Image Rusults] 24,200,000 Results | Britney Spears Area (768 x 1024 - 136k)
Find this (Myspace section)

Code: Select all

regexp -- {<div class="paging"><div class="listing">.*?1-.*?\s.*?\s(.+?)</div} $html - match

Replace the below with

Code: Select all

      # format output according to variables.
      if {$match != ""} {
        set output "\0037\[Myspace Rusults\]\003\002 ${match}\002 $videos${incith::google::seperator}"
        if {$incith::google::bold_descriptions == 0} {
          regsub -all -- "\002" $output {} output
        }
      }
Prints out:
[@LillePil] [Myspace Rusults] 312 videos | Lady GaGa ft. Akon - Just Dance (77 RMX)
Hope you like this addons i put in :)
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Fire-Fox wrote:Working, here are some addons if you want them :D

First off all thanks for this awesome script :)

Find this (Google section)

Code: Select all

# we need this to keep blogsearch results from appearing in our zipcodes, trust me, need this ;) 


Right above replace with below code

Code: Select all

      regsub -all -- {<(.+?)>} $match {} match
      # format output according to variables.
      if {$incith::google::total_results != 0 && $match > 0 && $spell == 0} {
        set output "\0037\[Google Rusults\]\003 \002${match}\017 [descdecode $titem]${incith::google::seperator}"
        if {$incith::google::bold_descriptions == 0} {
          regsub -all -- "\002" $output {} output
        }
      } 
Prints out :
[@LillePil] [Google Rusults] 5,420,000 Results | RoboCop (1987) @ http://www.imdb.com/title/tt0093870/ | RoboCop (2010) @ http://www.imdb.com/title/tt1234721/ | RoboCop - Wikipedia, the free encyclop @ http://en.wikipedia.org/wiki/Robocop | Video results for robocop @ http://video.google.com/videosearch?q=robocop
You silly.. :wink: Indeed, I am all for learning how to script to achieve your idea of what is best for this script. But in this case, you've reinvented the wheel so to speak.
To prepend static strings to the front of all the different triggers, you can use this part found in the config:

Code: Select all

    # This part was requested to be added so now here it is, it has
    # various prepends you may wish to have preceed each function.
    # To use this, just change what you see below from nothing to
    # something...ie, if you want [ GOOGLE ] to prepend google
    # search results change the search_prepend to "\[GOOGLE\]". You
    # can do the same with all of the following prepends, they will
    # start the output for each line. If you don't wish to use this,
    # leave them as "". Keep in mind tcl special characters MUST be
    # escaped or will cause tcl errors, and/or crash your bot. This
    # is your own problem, just be aware. Read about them if possible.
    #
    # Note 1: Prepends will increase your line length, and won't be
    # accommodated for in the max line length setting, so you may
    # find you need to lower your max line length setting if your
    # prepends are lengthy or contain lots of escape sequences. If
    # you don't you  may find the bots replys may get cut short or
    # cut completely by the ircd your using.
    #
    # Note 2: To use color, bold, etc.. simply use the proper escape
    # sequence to generate it here, make sure to properly CLOSE your
    # sequence (\003 for color, \002 for bold, etc) or you will see
    # the effect of the prepend bleed thru into your output as well.
    # ------
    variable search_prepend ""
    .. snipped big list of triggers ..
    variable trends_prepend ""
Now don't get me wrong at all, I'm not bashing you at all for what you've accomplished. It works that way you've done it too, and any way that works is the point. The elegance behind it only matters when errors/html changes cause problems and it becomes painful to revisit, as long as you understand the code is all that matters. Matters not how others interpret or criticize it. Either way is equally functional. ;)
Post Reply