| View previous topic :: View next topic |
| Author |
Message |
Andreoli Voice
Joined: 12 Jul 2010 Posts: 4
|
Posted: Sun Jul 18, 2010 12:58 pm Post subject: |
|
|
Ok, i got it working, but it has so much lag once I issue the command !fmylife, is anyone able to fix this by editing the script? Appreciate the help, got the script working but takes it 4 minutes to answer one command.  |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sun Jul 18, 2010 1:29 pm Post subject: |
|
|
| Andreoli wrote: | Ok, i got it working, but it has so much lag once I issue the command !fmylife, is anyone able to fix this by editing the script? Appreciate the help, got the script working but takes it 4 minutes to answer one command.  |
If you meant, tommek's script, then yes it has serious parsing issues that will cause it to take forever to finish. It runs a huge series of scrubbers over the entire html, this will take forever.
Instead it should pluck things from the html (regexp) into variables, and then use scrubbers (regsub) to remove undesireable elements from these variables. This method would be near instantaneous. This is how most scripts parsers are written. I have no idea why tommek made such a radical change with his parsers to make them so slow.
| Quote: | [10:34am] <speechles> !webby http://www.fmylife.com/random --regexp class="fmllink">(.*?)</p>--
[10:34am] <sp33chy> regexp: capture1 ( Today, I was taking a nap on the couch when my 2 year old daughter decided that daddy needed an ear cleaning. With all the grace of toddlerhood, she proceeded to stab me in the eardrum with a Q-tip. Now I can't hear her coming. FML ) |
Webby did this within 10 seconds. It uses regexp and regsub to scrub out excessive html elements. His script can do the same thing. _________________ speechles' eggdrop tcl archive
Last edited by speechles on Sun Jul 18, 2010 1:36 pm; edited 1 time in total |
|
| Back to top |
|
 |
Trixar_za Op

Joined: 18 Nov 2009 Posts: 143 Location: South Africa
|
Posted: Sun Jul 18, 2010 1:31 pm Post subject: |
|
|
There might always be a little lag when it comes to fmylife quotes. The website is actually pretty busy, which is why it lags or times out. It might also have something to do with you eggdrop host's connection.
My eggdrop is hosted on a T1 connection and sometimes takes up to 10 seconds to get the quote. Other days it just times out. Mostly it's about ~2 second delays though. Seems a bit more serious for you however. Maybe check with your host and see what's up. _________________ http://www.trixarian.net/Projects |
|
| Back to top |
|
 |
Andreoli Voice
Joined: 12 Jul 2010 Posts: 4
|
Posted: Mon Jul 26, 2010 2:32 pm Post subject: |
|
|
Ah well I host it from internet server provider. I have a great connection, and it is just that the script takes soo much time getting the quote, if it got the Fmylife quotes, not randomly but in order from newest to oldest perhaps that would reduce lag, seeing it is more orderly? One last thing, what is the whole script that doesn't include it to randomly announce a quote every let's say 10 minutes? I have a very vague understanding of Tcl scripting so sorry for my lack of knowledge towards all of this. |
|
| Back to top |
|
 |
username Op

Joined: 06 Oct 2005 Posts: 196 Location: Russian Federation, Podolsk
|
Posted: Mon Jul 26, 2010 3:29 pm Post subject: |
|
|
| Andreoli wrote: | | ... One last thing, what is the whole script that doesn't include it to randomly announce a quote every let's say 10 minutes? ... |
Set | Code: | # auto query
# 0 - off, 1 - on
set fmylife_auto_query 1
# set auto query interval (minutes)
set fmylife_auto_interval 10
| in the head of the script.
And about the time
| Quote: | [23:27:24] <@tvrsh> !load fmylife.tcl
[23:27:24] <+bionic> -(Load)- Script: fmylife.tcl - Size: 5.73046875 Kb - Status: OK -(Info)-
[23:27:25] <@tvrsh> !fmylife
[23:27:26] <+bionic> Today, at ... | ~1 second. _________________ Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/ |
|
| Back to top |
|
 |
holycrap Op
Joined: 21 Jan 2008 Posts: 152
|
Posted: Sat Sep 25, 2010 6:36 am Post subject: |
|
|
Add an option to be able to PM the bot and use the command...? Thanks!  |
|
| Back to top |
|
 |
username Op

Joined: 06 Oct 2005 Posts: 196 Location: Russian Federation, Podolsk
|
Posted: Sun Sep 26, 2010 1:33 pm Post subject: |
|
|
| holycrap wrote: | Add an option to be able to PM the bot and use the command...? Thanks!  |
Find | Code: | | bind pub - !fmylife fm_main_proc | and change to | Code: | | bind pub - !fmylife fm_main_pub |
After that add | Code: | bind msg - !fmylife fm_main_msg
proc fm_main_pub { nick uhost hand chan arg } {
global fmylife_channels
if {[lsearch $fmylife_channels $chan] == -1} {
return 0
}
fm_main_proc $nick $uhost $hand $chan $arg
}
proc fm_main_msg { nick uhost hand arg } {
fm_main_proc $nick $uhost $hand $nick $arg
}
|
And in proc fm_main_proc delete this lines | Code: | if {[lsearch $fmylife_channels $chan] == -1} {
return 0
} |
_________________ Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/ |
|
| Back to top |
|
 |
holycrap Op
Joined: 21 Jan 2008 Posts: 152
|
Posted: Sat Oct 02, 2010 4:43 am Post subject: |
|
|
Works like a charm.
Thanks!  |
|
| Back to top |
|
 |
username Op

Joined: 06 Oct 2005 Posts: 196 Location: Russian Federation, Podolsk
|
Posted: Sat Oct 02, 2010 10:10 am Post subject: |
|
|
You can download latest version from this page. _________________ Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/ |
|
| Back to top |
|
 |
username Op

Joined: 06 Oct 2005 Posts: 196 Location: Russian Federation, Podolsk
|
Posted: Sun Oct 03, 2010 3:56 am Post subject: |
|
|
Ive tried to add search function to this script and I cannot understant word decoding in this site. I thought it was Base64 but I was wrong.
For example it decode 'beer' to '4ca835d26b004'. _________________ Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/ |
|
| Back to top |
|
 |
FightingNavyman Voice
Joined: 18 Jan 2011 Posts: 35
|
Posted: Tue Jan 18, 2011 1:58 pm Post subject: Fmlife.tcl |
|
|
When can we see a 2011 version  |
|
| Back to top |
|
 |
Sydneybabe Op
Joined: 27 Apr 2007 Posts: 106 Location: Philippines
|
Posted: Sat Jul 16, 2011 7:16 am Post subject: |
|
|
Hi why the message on the channel every xx minutes only like this?
| Quote: | <+bot> "Virginia)
<+bot> "Massachusetts)
<+bot> "Delaware)
|
This script is working before and i don't why this happen  |
|
| Back to top |
|
 |
goalie204 Halfop
Joined: 28 Apr 2011 Posts: 44
|
Posted: Sun Jul 17, 2011 7:24 am Post subject: |
|
|
me too, just not working anymore
<nostalgic> !fml
<secksy> "Virginia)
<nostalgic> !fml
<secksy> "Stockport) |
|
| Back to top |
|
 |
Trixar_za Op

Joined: 18 Nov 2009 Posts: 143 Location: South Africa
|
Posted: Mon Jul 18, 2011 12:48 am Post subject: |
|
|
This is because the layout changed again...
Basically the div class got changed from "post" to "post article". Here's an example of how it looks after it's cleaned up: | Code: | | <div class="post article" id="7966871"><p>Today, my seven-year-old sister came to stay at my house for the night. She usually just sleepwalks. But tonight she sleep-peed in my clean clothes basket. FML</p> |
There is also a new (<span>number</span>) in the above code that isn't show. Just add a regex scrub for it and it should disappear. All this has been added to my script and uploaded. I had a look at username's script, but I'm unsure how to fix it. He grabs more information that mine does, so more changes might be needed for his version. Anybody that's willing, please help out these people  _________________ http://www.trixarian.net/Projects |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Mon Jul 18, 2011 2:47 am Post subject: |
|
|
| Quote: | <speechles> !fml
<sp33chy> Today, as I woke up early to do my physics homework, I heard my parents talk about how big a disappointment I am for them. They discussed how stupid, immature and how big a burden I was. They knew I was listening. FML
<sp33chy> #6403187 (91) I agree, your life sucks (25084) - you deserved it (2792) - On 11/22/2009 at 10:39am - misc - by Cerezo (man) - Guatemala (Guatemala) @ http://www.fmylife.com/miscellaneous/6403187
<speechles> !fml kids
<sp33chy> Today, I surprised my four year old daughter with a stuffed dinosaur. She named it 'Horny.' FML
<sp33chy> #17145702 (116) I agree, your life sucks (3993) - you deserved it (807) - On 07/17/2011 at 3:14am - kids - by douglas - United States (Washington) @ http://www.fmylife.com/kids/17145702
<speechles> !fml kids 4
<sp33chy> Today, I was invited over to a dinner with the CEOs of my company, along with my two children. My 3 year-old asked loudly why we have two "nose holes", to which my 4 year-old son replied "So you can pick your nose and still breathe!" He then demonstrated. FML
<sp33chy> #17088457 (119) I agree, your life sucks (7833) - you deserved it (1725) - On 07/13/2011 at 12:43am - kids - by ohno - United States (Colorado) @ http://www.fmylife.com/kids/17088457
<speechles> !fml love 4-6
<sp33chy> Today, I was video chatting with my boyfriend of two years. He randomly asked me to turn off my webcam. I asked why, and he said to just trust him. Turns out it was because he didn't want to see my face as he broke up with me. FML
<sp33chy> #17125458 (121) I agree, your life sucks (7530) - you deserved it (470) - On 07/15/2011 at 6:21pm - love - by emily - United States (Massachusetts) @ http://www.fmylife.com/love/17125458
<sp33chy> Today, I learned why my boyfriend of 10 months and I never hang out at his place. He still lives at home with his mother. He's 38. FML
<sp33chy> #17116757 (159) I agree, your life sucks (5933) - you deserved it (1036) - On 07/15/2011 at 1:51am - love - by brsoxgirl - United States (New Jersey) @ http://www.fmylife.com/love/17116757
<sp33chy> Max-results of 2 reached, refine search to see more... |
Another one for people to experiment with. This one is using Incith's layout as it's base. Have fun, dance like an robot. It supports ranges, categories, and other stuff. It displays verbatim as would appear on the webpage without rewording a thing. Experiment with it. It's simply another choice for an FML script amongst the withering vines that are FML scripts.
Download it here: Incith-FML v1.0
Now supports paging.. see below.. | Quote: | <speechles> !fml mi-page 7sc 5
<sp33chy> Today, I was so hungover, I started yelling at inanimate objects. My mom walked in on me calling my cereal a "worthless piece of [censored] sent from the bowels of Hell." FML
<sp33chy> #16950938 (245) I agree, your life sucks (2618) - you deserved it (12157) - On 07/02/2011 at 4:54pm - misc - by Cowgirl_Up37 (woman) - United States (Texas) @ www.fmylife.com/miscellaneous/16950938 (entry 5) www.fmylife.com/miscellaneous?page=7
<speechles> !fml work -page 2 4
<sp33chy> Today, my boss gave me a speech about my "motivation issues". I've been working for him for 2 months, the commissions I've made for him paid off his bills, so what are my motivation issues? I turned down his offer of a date. I have a boyfriend. He keeps asking. FML
<sp33chy> #16827644 (88) I agree, your life sucks (9673) - you deserved it (612) - On 06/24/2011 at 1:11am - work - by Leah (woman) - United States @ www.fmylife.com/work/16827644 (entry 4) www.fmylife.com/work?page=2 |
Paging is done with the -page switch. You can embed this as I did above in the first request and it still works perfectly fine. Enjoy
The categories you can use in your !fml requests are:
love, money, kids, work, health, intimacy, misc, random
Try for example: !fml intimacy
then.. !fml intimacy 2
and 3, 4, 5, 6, 7, 8, 9, 10
once you hit 10, start to page
!fml intimacy -page 1
!fml intimacy 2 -page 1
!fml intimacy -page 1 3
etc etc etc
it literally does not matter where you place the paging switch. Paging is allowed up to 9 pages. It can go higher, if you need it to let me know. The page switching is also off by 1. This is normal. As using -page 1 gets you the page _after_ using no page switch, aka, page 2. -page 2 would get you page 3. Etc etc. Hopefully you understand. _________________ 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
|
|