Google Apps脚本中Utilities.unzip(blob)的Blob是否有大小限制? [英] Is there a size limit to a blob for Utilities.unzip(blob) in Google Apps Script?

查看:77
本文介绍了Google Apps脚本中Utilities.unzip(blob)的Blob是否有大小限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Google脚本,可以访问一个网站,找到一个.zip文件,将其解压缩,然后从相关文件中提取相关数据.

I have a google script which accesses a website, finds a .zip file, unzips it, and extracts the relevant data from the relevant files.

我想做同样的事情,但是要在同一站点上使用另一个更大的.zip文件.

I want to do the same thing, but for a different, larger .zip file on the same site.

我已经访问了.zip(使用几乎相同的代码),但是它引发了一个错误:无法解压缩."

I've accessed the .zip (using almost identical code), but it throws an error: "Could not unzip."

我的代码:

  var dir = UrlFetchApp.fetch(url);
  var b = dir.getBlob();
  var files = Utilities.unzip(b);

两个文件之间的唯一区别是:

The only difference between the two files are these:

  • 文件A以"Update%201.8.5.zip"结尾,包含9个文件(压缩后为5.46MB,5.15MB)
  • 文件B的结尾为"260_185.zip",其中包含407个文件(384MB,280MB压缩文件)

这使我认为Utilities.unzip()方法有一个限制(文件大小或文件数).谁能确认这一点,还是文件名格式的东西搞砸了?

This makes me think that there is a limit (size or number of files) to the Utilities.unzip() method. Can anyone confirm this, or is there something with the format of the filenames that is messing things up?

推荐答案

配额Google服务包括限制

收到的网址提取数据:100MB/天

URL Fetch data received: 100MB / day

因此,看来您的网址请求实际上无法产生有效的zip文件.

so it seems your URL request could not actually produce a valid zip file.

这篇关于Google Apps脚本中Utilities.unzip(blob)的Blob是否有大小限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆