I am trying to scrape data from the Peruvian Electronic System for Government Procurement and Contracting (SEACE) (using RSelenium) and I have succeeded until I try to capture the URL from the Captcha image. The problem that I encounter is that the link for the captcha has the extension "dynamiccontent.properties.xhtml" (See next screenshot), but not a "JPEG", "JPG" or "PNG" extension.

I would like to get the URL from the captcha image in one of these extensions (JPEG, JPG or PNG) using R, any suggestions? Thanks!
