Revised and enhanced URL parsing for pbs URLS