improve get_hash_code function, use regex get the url