Posted to tcl by mjanssen at Tue Jan 02 22:16:53 GMT 2007view raw
- package require tdom
- package require http
- set tok [http::geturl http://www.rocheck.de/index.php?si=suche&v=red%20potion&suche=okay]
- set data [http::data $tok]
- set doc [dom parse -html $data]
- set items {}
- foreach href [$doc selectNodes {//td[@width="350"]/descendant::*/@href}] {
- regexp -- {item=(.*)} $href -> item
- lappend items $item
- }
- puts $items