> >     local lurl =
> > "http://lyrc.com.ar/tema1es.php?artist=
> "..url_encode(artist).."&songname="..url_encode(
> > title )
> >     local lf = io.popen("curl --connect-timeout 1 -fsm 3 '"..lurl.."'")
>
> -- why not use lynx -dump -nolist ? No need to do html-stuff and the
> -- overhead should be small
>
>
I just modified my code to use "lynx -dump -nolist". It is really cool :D no
html! I did not know about it. I had picked up curl as it was used in other
widgets too.



> I myself go one step further: after i fetched correct lyrics i store it
> in ~/.lyrics/artist-title.txt and when i want to show it again i first
> try to open this text and only if that fails i try to fetch it from
> somewhere else ..
>
> I also only load lyrics if i really want to show it (in a
> notification) - so i think it does not make much sense to put int in
> vicious, also funny things will happen when the server replies really
> slow ...
>

Implementing your suggestions will only make this lyrics plugin more
efficient. With lynx's connect-timeout option problems of slow server can be
alleviated. I would recommend adding lyrics fetcher to vicious so that
others can also take advantage of it; maybe as another widget.

-- 
Anurag Priyam,
3rd Year Undergraduate,
Department of Mechanical Engineering,
IIT Kharagpur.
+91-9775550642

Reply via email to