Once again, http.tcl and egghttp.tcl are NOT the same as "package http" - package http comes with the tcl library. Whether it works under cygwin, I do not know, but I would try removing the version number and just have "package require http" and see if that works. The other probl...
A good general security rule, when dealing with suspect input, is to have a list of allowed chars (A-Za-z0-9, etc), rather than a list of disallowed chars (more likely to overlook some chars when trying to disallow.) The allowed list would likely be shorter as well.
Try this, as one line: regexp {<tr class="dlc_info_row">.*?<td>(.*?)</td>} $data - artist Newlines are just another char in regexp. And, the tcl parser isn't going to work properly if you have newlines in the middle of a regexp (unless perhaps if you escape them so the parser knows to cont...
theice wrote:but I couldn't find anywhere how to easily open a connecting to a website and parse the information.
Are you kidding?
You mean, out of all the hundreds of web-parsing script topics here, and all the web-parsing scripts in the archive, you couldn't find one example of how to grab/parse a website?
http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=1375 is a nicely written script, but it's for looking up users, not artists.. It also no longer works, afaict, because the url within the script is no longer valid. I only found 1 other lastfm script for "Somafm" in the eg...