Optimize the URL collect codes

Optimize the URL collect codes