script to exctract document's title and category from html.