| View previous topic :: View next topic |
| Author |
Message |
Trixar_za Op

Joined: 18 Nov 2009 Posts: 143 Location: South Africa
|
Posted: Sat Oct 22, 2011 9:00 am Post subject: |
|
|
| 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. _________________ http://www.trixarian.net/Projects |
|
| Back to top |
|
 |
Mysticales Voice
Joined: 18 Oct 2011 Posts: 26
|
Posted: Sat Oct 22, 2011 12:17 pm Post subject: |
|
|
| 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?~ |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sat Oct 22, 2011 12:38 pm Post subject: |
|
|
| 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: | # 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: | # 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  _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
Mysticales Voice
Joined: 18 Oct 2011 Posts: 26
|
Posted: Sat Oct 22, 2011 8:08 pm Post subject: |
|
|
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?~ |
|
| Back to top |
|
 |
goalie204 Halfop
Joined: 28 Apr 2011 Posts: 44
|
Posted: Sat Nov 12, 2011 9:44 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
guest Halfop
Joined: 19 Jan 2004 Posts: 52
|
|
| Back to top |
|
 |
goalie204 Halfop
Joined: 28 Apr 2011 Posts: 44
|
Posted: Tue Nov 15, 2011 2:24 pm Post subject: |
|
|
<goalie> !review uncharted 3
[secksy(dcc)] [18:24] Tcl error [incith::google::public_message]: can't read "name": no such variable |
|
| Back to top |
|
 |
shadrach Halfop
Joined: 14 Dec 2007 Posts: 74
|
Posted: Fri Dec 02, 2011 9:05 am Post subject: |
|
|
| Add !news to the list of ceased to function. |
|
| Back to top |
|
 |
MePH Voice
Joined: 12 Apr 2010 Posts: 5
|
Posted: Thu Jan 12, 2012 6:29 pm Post subject: |
|
|
| translate seems to have died on me here :\ |
|
| Back to top |
|
 |
goalie204 Halfop
Joined: 28 Apr 2011 Posts: 44
|
Posted: Thu Jan 12, 2012 10:19 pm Post subject: |
|
|
| ditto re translate |
|
| Back to top |
|
 |
iRoc Guest
|
Posted: Fri Jan 20, 2012 6:34 am Post subject: |
|
|
| Quote: | 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 |
|
| Back to top |
|
 |
tommytom Voice
Joined: 09 Sep 2011 Posts: 16
|
Posted: Sun Jan 22, 2012 6:15 pm Post subject: translate fix |
|
|
change: | Code: | | if {[regexp -- {</h3>.*?</object></div>(.+?)</div>} $html - match]} { regsub -all {<.*?>} $match "" match } | to: | Code: | | 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: | | if {[regexp -- {</object></div>(.+?)<} $html - match]} { regsub -all {<.*?>} $match "" match } |
|
|
| Back to top |
|
 |
iRoc Guest
|
Posted: Mon Jan 23, 2012 5:06 am Post subject: Re: translate fix |
|
|
| tommytom wrote: | change: | Code: | | if {[regexp -- {</h3>.*?</object></div>(.+?)</div>} $html - match]} { regsub -all {<.*?>} $match "" match } | to: | Code: | | 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: | | 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: |
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
| Quote: | 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 |
|
|
| Back to top |
|
 |
tommytom Voice
Joined: 09 Sep 2011 Posts: 16
|
Posted: Mon Jan 23, 2012 4:10 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Arkadietz Halfop

Joined: 14 Jul 2006 Posts: 67 Location: cat /dev/zero > /dev/null;
|
Posted: Mon Jan 30, 2012 6:12 pm Post subject: |
|
|
[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%20class=l%20onmousedown=return%20rwt(this,'','','','1','AFQjCNHWk5y5Obc1b4XnF1k2F5wSsIHa3g','','0CDMQFjAA',null,event)
every result looks like this _________________ On a unix system everything is a file ; if something is not a file , it is a proccess. |
|
| 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
|
|