How to remove from the file path?

后端 未结 2 767
忘掉有多难
忘掉有多难 2021-01-06 07:40
file:///home/ashu/Music/Collections/randomPicks/ipod%20on%20sep%2009/Coldplay-Sparks.mp3

How can I convert

2条回答
  •  有刺的猬
    2021-01-06 08:07

    Have a look at url2pathname:

    import urllib2
    
    path = urllib2.url2pathname("file:///home/ashu/Music/Collections/randomPicks/ipod%20on%20sep%2009/Coldplay-Sparks.mp3")
    

提交回复
热议问题