update page-getting algorithm, the same as price-getting; optimize testing code