in reply to Re: using mechanize to expand a collasped menu structure.
in thread using mechanize to expand a collasped menu structure.

I agree.

There are really two possibilities here.

One, the page actually contains all the links and some of them are hidden from modern GUI browsers using CSS or JavaScript.

Two, the page actually reloads when you click the links, and displays links using some kind of CGI script, based on the URL/query string.

If it's One, then all the links are in the page and you just need to find them. If it's Two, then it's not really "a page" at all, but a series of pages and you might as well treat them as such:

@pages=('domain.com/script?shown=foo', 'domain.com/script?shown=bar'); # etc get_links_from(@pages);

With, of course, some kind of test to make sure you don't fetch any link more than once.



($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
=~y~b-v~a-z~s; print