extract category from url