migrated from jsdom to htmlparser2