in reply to RFC: URI::URL::Detail

Hey Guys

Thanks for the replies. I went through all the modules that were suggested - I will build on top of a couple of them, have also gotten in touch with the authors of some of these modules.

I believe "HTML::ElementExtractor" is a good name for the module. I understand that that would make it similar to TreeBuilder but I think the difference in functionality will make up for that.

Hoping for further comments!!

Replies are listed 'Best First'.
Re^2: RFC: URI::URL::Detail
by Jenda (Abbot) on Aug 10, 2009 at 09:51 UTC

    If it gets named "::ElementExtractor" I would expect it to be able to extract the info pertaining to any element, not just links. Will there be a way to extract for example the list of <IMG> tags with the attributes?

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

      Hey Jenda,

      Actually yes - here is a list of features the module will have in V 0.01:

      1. Given the HTML of a page
        1. Find all anchor elements - broken into "this domain links" and "other domain links".
        2. Find images on a page - broken as above.
        3. Find the Title, description and other such meta data.
        4. Find meta keywords and description of the page.
        5. Extract lists (ul and ol) from the HTML of a page
        6. Find RSS Feeds of a page, if any.
        7. anything else I / You guys can think of ...
      2. Split up an anchor tag into : The URL, the alt text and the anchor text.
      3. Given possible anchor/alt text find the related link. [Given Home -  <a href=""> home page </a> will be extracted.
      4. Given a potentially relative URL and the current URL, returns the absolute URL.
      5. Given a potential redirecting URL, returns the final destination URL.
      6. Breaks up a URL into Protocol, domain and URI

      I am still looking for additional features I can add. So please do suggest anything else you can think of

        anything else I / You guys can think of ...

        Subclass WWW::Mechanize, because it does practically everything on your list.