http服务器上有一个目录,其url是http://somehost/maindir/recent/。这个“最近”目录包含 50 个 zip 子目录。
我可以读取一个 zip 文件
zfile = "http://somehost/maindir/recent/1.zip"
with RemoteZip(zfile) as zip:
for zip_info in zip.infolist():
data = zip.read(zip_info.filename)
但是我不知道要遍历“http://somehost/maindir/recent/”并从每个 zip 中读取数据。我尝试了 glob、os.join、os.walk 但在静脉中。我想要这样的东西:
for zfile in baseurl: //unable to do this line.
with RemoteZip(zfile) as zip:
for zip_info in zip.infolist():
data = zip.read(zip_info.filename)
月关宝盒
相关分类