如何在 Google App Engine 上 fetch() 超过 1MB?

发布于 2024-10-01 08:39:48 字数 239 浏览 1 评论 0原文

Google App Engine 将 urlfetch.fetch() 响应限制为 1MB。有没有解决方法(也许切换到付费版本)?

我正在使用Python,如果可以提供一个例子那就太好了。

Google App Engine limits urlfetch.fetch() responses to 1MB. Is there any workaround of this (switching to paid version maybe)?

I'm using Python and if it's possible to provide an example that would be great.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

万劫不复 2024-10-08 08:39:48

使用全新的 SDK 1.4.0,您可以下载 32MByte; 请记住,您仍然有 10 秒的截止时间限制;-) 。 请求处理程序的截止时间最长为 60 秒,任务队列和 cron 作业处理程序的截止时间最长为 10 分钟。

URLFetch 允许的响应大小已
已增加至 32 MB。要求
大小仍限制为 1 MB。

With the brand new SDK 1.4.0 you can download 32MByte; keep in mind that you still have the 10 seconds Deadline limit though ;-) . deadline can be up to a maximum of 60 seconds for request handlers and 10 minutes for tasks queue and cron job handlers.

URLFetch allowed response size has
been increased, up to 32 MB. Request
size is still limited to 1 MB.

情痴 2024-10-08 08:39:48

不可以,每次 URL 提取无法提取超过 1MB 的数据(即使您启用了计费)。但是,您也许可以使用 获取目标 URL 的部分内容Range 标头,然后组合这些部分。这甚至可能会更快,因为您可以同时提取每个 1MB 块(使用异步提取)。

No, you cannot fetch more than 1MB per URL fetch (even if you enable billing). However, you might be able to fetch portions of the target URL using the Range header and then combine these pieces. This might even be faster since you could fetch each 1MB chunk simultaneously (using asynchronous fetches).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文