egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

fmylife.com eggdrop tcl script request

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Sane
Voice


Joined: 17 Nov 2013
Posts: 19
Location: #kl-channel@Rizon.net

PostPosted: Sun May 06, 2018 3:59 pm    Post subject: fmylife.com eggdrop tcl script request Reply with quote

Hi,

I was wondering if anyone had a working version of any of the FML scripts out there?

Or if if anyone can provide a fix for any of the fml scripts already out there? I can provide a few fml TCL pastes of code for someone to look at if need be; maybe they could fiddle with them and get them working.

Failing that, it would be amazing if someone could write a new script to fetch random FML quotes from fmylife.com

Many thanks in advance.

P.S I have searched Google of course and all the tcl/eggdrop repositories and archives that I could find, including Hawkee and some other sites but all the ones that I've tried out, and ones that I have used in the past, no longer work. Obviously due the site and layout changes overtime.

I have asked in a few IRC channels as well -- #eggdrop, #tcl, #egghelp, #script-help etc... on various servers, but I think people were away and some weren't able to help unfortunately; but I appreciate them trying though.
Back to top
View user's profile Send private message
silentziler
Voice


Joined: 09 Sep 2015
Posts: 11

PostPosted: Wed May 09, 2018 10:55 pm    Post subject: fml script Reply with quote

Code:

############################################
#  Command for random fml quote = !fml     #
############################################

bind pub - !fml pub_FML

proc pub_FML {nick uhost handle chan text} {


        package require http
 ## UNCOMMENT FOR HTTPS ##     package require tls       
 ## UNCOMMENT FOR HTTPS ##     http::register https 443 [list ::tls::socket -tls1 1]
        set agent "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
        set token [http::config -useragent $agent]
        set token [http::geturl "http://www.fmylife.com/random"]
        set html [http::data $token]
        http::cleanup $token
 ## UNCOMMENT FOR HTTPS ##      http::unregister https

regexp {<p class="block hidden-xs">(.*?)</a>} $html - a
regsub -all {<[^>]*>} $a {} a
regsub -all {[\r\t\n]+} $a "" a
putserv "PRIVMSG $chan : $a"
}

putlog "Random FML loaded!"


Run !fml for random quote.
Let me know if you have any issues.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber