Using inspiration from Aaron Guilmette's Office 365 PAC Generator script I have created a Powershell script that looks to the current Office 365 URL xml file, pulls the information down and creates a TXT file with the URLs. 

 

The contents of the final output file can then be used to help you configure a WPAD/PAC file for your environment.  

 

You can select to pull all the URLs down or only ones for specific products. 

 

PowerShell
Edit|Remove
.\Office365URLs.ps1  
This will just run the script with all defaults. 
 
PowerShell
Edit|Remove
.\Office365URLs.ps1 -Products EXO,LYO 
This will run the script and only include entries related to Exhange Online and Skype for Business (formerly Lync Online).