download a zip file to a local drive and extract all files to a destination folder using python 2.5

前端 未结 3 718
孤城傲影
孤城傲影 2021-01-01 07:40

I am trying to download a zip file to a local drive and extract all files to a destination folder.

so i have come up with solution but it is only to \"download\" a f

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-01 08:23

    For downloading, look at urllib:

    import urllib
    webFile = urllib.urlopen(url)
    

    For unzipping, use zipfile. See also this example.

提交回复
热议问题