return links as URL objects in html vocab

db4
Doug Coleman 2009-04-03 21:15:52 -05:00
parent 4c7b2f9337
commit 8875c2ba26
1 changed files with 4 additions and 2 deletions

View File

@ -127,11 +127,13 @@ TUPLE: link attributes clickable ;
[ name>> "a" = ] [ name>> "a" = ]
[ attributes>> "href" swap key? ] bi and ] filter [ attributes>> "href" swap key? ] bi and ] filter
] map sift ] map sift
[ [ attributes>> "href" swap at ] map ] map concat ; [ [ attributes>> "href" swap at ] map ] map concat
[ >url ] map ;
: find-frame-links ( vector -- vector' ) : find-frame-links ( vector -- vector' )
[ name>> "frame" = ] find-between-all [ name>> "frame" = ] find-between-all
[ [ attributes>> "src" swap at ] map sift ] map concat sift ; [ [ attributes>> "src" swap at ] map sift ] map concat sift
[ >url ] map ;
: find-all-links ( vector -- vector' ) : find-all-links ( vector -- vector' )
[ find-hrefs ] [ find-frame-links ] bi append prune ; [ find-hrefs ] [ find-frame-links ] bi append prune ;