| View previous topic :: View next topic |
| Author |
Message |
incith Master

Joined: 23 Apr 2005 Posts: 275 Location: Canada
|
|
| Back to top |
|
 |
KristianF Voice
Joined: 16 Dec 2007 Posts: 3
|
Posted: Sun Jan 04, 2009 12:53 pm Post subject: |
|
|
oh, I must have missed that part.
Sorry for that, and thanks for the help. |
|
| Back to top |
|
 |
inz Voice
Joined: 25 Jan 2009 Posts: 3
|
Posted: Sun Jan 25, 2009 3:03 pm Post subject: |
|
|
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:
| Quote: |
[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/publications/the-world-factbook/geos/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 |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Tue Jan 27, 2009 7:04 pm Post subject: |
|
|
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.
| Quote: | <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!  _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
inz Voice
Joined: 25 Jan 2009 Posts: 3
|
Posted: Wed Jan 28, 2009 1:33 pm Post subject: |
|
|
| nice job, thanks a lot! |
|
| Back to top |
|
 |
tmyoungjr Voice
Joined: 24 Aug 2007 Posts: 14
|
Posted: Wed Jan 28, 2009 4:39 pm Post subject: |
|
|
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! |
|
| Back to top |
|
 |
testebr Halfop
Joined: 01 Dec 2005 Posts: 86
|
Posted: Wed Jan 28, 2009 4:45 pm Post subject: |
|
|
<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. |
|
| Back to top |
|
 |
tmyoungjr Voice
Joined: 24 Aug 2007 Posts: 14
|
Posted: Wed Jan 28, 2009 5:33 pm Post subject: |
|
|
| 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  |
|
| Back to top |
|
 |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Fri Jan 30, 2009 8:12 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Fri Jan 30, 2009 8:21 pm Post subject: |
|
|
| 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. | Quote: | <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: | # 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. _________________ speechles' eggdrop tcl archive
Last edited by speechles on Fri Jan 30, 2009 8:30 pm; edited 1 time in total |
|
| Back to top |
|
 |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Fri Jan 30, 2009 8:30 pm Post subject: |
|
|
Hey
Here is the output
| Code: | | <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
My box is in france so that explains it
btw: google prints out in english, and danish ? so i think youtube can to
_________________ GreatZ
Fire-Fox | Denmark
Scripts: Relay | Store Text | TvMaze |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sat Jan 31, 2009 12:48 pm Post subject: |
|
|
| Fire-Fox wrote: | btw: google prints out in english, and danish ? so i think youtube can to
|
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...
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  _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Sat Jan 31, 2009 1:31 pm Post subject: |
|
|
seems to work
_________________ GreatZ
Fire-Fox | Denmark
Scripts: Relay | Store Text | TvMaze |
|
| Back to top |
|
 |
Fire-Fox Master

Joined: 23 Sep 2006 Posts: 270 Location: /dev/null
|
Posted: Sat Jan 31, 2009 4:29 pm Post subject: |
|
|
Working, here are some addons if you want them
First off all thanks for this awesome script
Find this (Google section)
| Code: | | # we need this to keep blogsearch results from appearing in our zipcodes, trust me, need this ;) |
Right above replace with below code
| Code: | 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 :
Find this (YouTube section)
Find | Code: | | set titen "results" |
Right under you have
| Code: | # 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: | # 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: | Quote: | | [@LillePil] [YouTube] 11,100 video results | Original 1987 Trailer for Robocop |
Find this (Book section)
| Code: | | while {$results < $incith::google::print_results} { |
Right above replace with
| Code: | 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 : | Quote: | | [@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: | | while {$results < $incith::google::image_results} { |
Replace the above with
| Code: | 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 : | Quote: | | [@LillePil] [Image Rusults] 24,200,000 Results | Britney Spears Area (768 x 1024 - 136k) |
Find this (Myspace section)
| Code: | | regexp -- {<div class="paging"><div class="listing">.*?1-.*?\s.*?\s(.+?)</div} $html - match |
Replace the below with
| Code: | # 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: | Quote: | | [@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 |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sun Feb 01, 2009 9:20 pm Post subject: |
|
|
| Fire-Fox wrote: | Working, here are some addons if you want them
First off all thanks for this awesome script
Find this (Google section)
| Code: | | # we need this to keep blogsearch results from appearing in our zipcodes, trust me, need this ;) |
Right above replace with below code
| Code: | 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 :
|
You silly.. 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: | # 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.  _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
|
|
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
|
|