title: how to get file extension from url
body: <p>I am trying to create a js file downloader module. Right now I stumbled on some file urls like - <a href="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTA_Rg2GwJVJEmOGGoYFev_eTSZAjkp_stpi4cUXpjWbE6Wh7gSpCvldg" rel="nofollow noreferrer">https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTA_Rg2GwJVJEmOGGoYFev_eTSZAjkp_stpi4cUXpjWbE6Wh7gSpCvldg</a>. </p>
  
  <p>My question here is how to get the proper extension of the file knowing only the url ? </p>
  
  <p>The only idea I have is to use this <a href="https://www.npmjs.com/package/file-type" rel="nofollow noreferrer">module</a> to check the file after I download it.</p>