![]() |
[Résolu] récupérer texte dans page html - Version imprimable +- Communauté Eggdrop (https://forum.eggdrop.fr) +-- Forum : Eggdrop et scripts (https://forum.eggdrop.fr/forumdisplay.php?fid=8) +--- Forum : Scripts (https://forum.eggdrop.fr/forumdisplay.php?fid=4) +--- Sujet : [Résolu] récupérer texte dans page html (/showthread.php?tid=1594) |
récupérer texte dans page html - BrYcOu - 16/09/2015 Bonjour, Je souhaiterai si possible un script permettant de récupérer une information sur une page html par l'eggdrop et la dire sur un salon. Il s'agit en fait d'un titre d'une musique ainsi que l'artiste sur cette page: https://www.radioking.fr/widgets/currenttrack.php?radio=2263&format=text ou https://www.radioking.fr/widgets/currenttrack.php?radio=2263&format=json Bien sur l'afficher à chaque fois aussi que celle-ci change. Merci Cordialement. RE: récupérer texte dans page html - heartbroken - 16/09/2015 This one, gets song data from first link (in "text" format) .chanset #channel +radioking to activate on your channel. this script requires tls : http://sourceforge.net/projects/tls/ tcl
and this one for second link you gave. ( for "json" format) This one requires tcllib's json package and tls : http://sourceforge.net/projects/tls/ tcl
RE: récupérer texte dans page html - BrYcOu - 19/09/2015 Tout d'abord merci de ton aide. J'ai bien rentré ce tcl dans mon eggdrop le format text mais je n'ai rien qui s'affiche du tout et aucun message d'erreur. RE: récupérer texte dans page html - heartbroken - 19/09/2015 I've just tried and tested first code on a bot. (eggdrop1.8 , Tcl 8.6.4 ) I uploaded script in to my bot/scripts and added source scripts/radioking.tcl line into my bot's .conf file: http://i.imgur.com/vV6Bs8S.png then i've connected to my bot via telnet and i typed .rehash first: http://i.imgur.com/F6Johz8.png then to activate this script on a #channel, .chanset #channel +radioking http://i.imgur.com/f0ltoqi.png and my bot started posting new songs on #channel like you've wanted if i understood your request correct before. http://i.imgur.com/lwe9Ns4.png These radioking links has https needs tls , if you've .tcl .set commands enabled on your bot's .conf , .tcl package present tls to check if it could see this package. this : .tcl package present tls command should return tls version. if it doesn't return any value and if you've already installed this, you could try to add a line like: lappend ::auto_path /path/to/tls right before the : package require tls or you can add this on bot's .conf this may help to find this tls package has been located on the system. RE: récupérer texte dans page html - BrYcOu - 19/09/2015 i send ou a MP ;) RE: récupérer texte dans page html - BrYcOu - 22/09/2015 Bonjour , j'ai une erreur TCL: Tcl error [radio_chk]: no valid protocol selected Je suis en tcl 8.5 et eggdrop 1.6.21 |