     ] map ;
 
 : find-by-id ( vector id -- vector' elt/f )
-    '[ "id" attribute _ = ] find ;
+    '[ _ html-id? ] find ;
 
 : find-by-class ( vector id -- vector' elt/f )
     '[ _ html-class? ] find ;

    >lower '[ name>> _ = ] find ;

: find-by-id-between ( vector string -- vector' )
    dupd
    '[ "id" attribute _ = ] find find-between* ;

: find-by-class-between ( vector string -- vector' )
    dupd
    '[ _ html-class? ] find find-between* ;

: find-by-class-id-between ( vector class id -- vector' )
    [
        '[
            [ _ html-class? ]
            [ "id" attribute _ = ] bi and
        ] find
    ] [
        2drop find-between*
    ] 3bi ;

: find-by-attribute-key ( vector key -- vector' elt/? )
    >lower
    [ attributes>> at _ = ] filter sift ;

: find-by-attribute-key-value ( vector value key -- vector' )
    >lower
    [ attributes>> at over = ] with filter nip sift ;

: find-first-attribute-key-value ( vector value key -- i/f tag/f )
    >lower
    [ attributes>> at over = ] with find rot drop ;

: tag-link ( tag -- link/f ) "href" attribute ;

: find-links ( vector -- vector' )
    [ { [ name>> "a" = ] [ "href" attribute ] } 1&& ]
    find-between-all ;

: find-images ( vector -- vector' )
    [
        {
            [ name>> "img" = ]
            [ "src" attribute ]
        } 1&&
    ] find-all
    values [ "src" attribute ] map ;

: find-by-text ( seq quot -- tag )
    [ dup name>> text = ] prepose find drop ; inline

    http-get parse-html ;

: attribute ( tag string -- obj/f )
    swap attributes>> at ;

: attribute* ( tag string -- obj ? )
    swap attributes>> at* ;

: attribute? ( tag string -- ? )
    swap attributes>> key? ;

: find-all ( seq quot -- alist )
   [ <enum> >alist ] [ '[ second @ ] ] bi* filter ; inline
