gpt4 book ai didi

RUBY -Mechanize::ResponseCodeError: 503 => Net::HTTPServiceUnavailable

转载 作者:行者123 更新时间:2023-12-04 16:21:15 26 4
gpt4 key购买 nike

我尝试在其他线程上寻找答案,但觉得这些回复与我的情况无关(如果情况并非如此,我深表歉意)。也就是说,我正在尝试在 irb 中运行一个简单的 ruby​​ 脚本

>     require 'mechanize'
>
> agent = Mechanize.new
>
> page = agent.get('https://www.amazon.com/')

本质上,我正在尝试对亚马逊进行网络抓取,但出于某种原因,我遇到了此错误:
> Mechanize::ResponseCodeError: 503 => Net::HTTPServiceUnavailable for
> https://www.amazon.com/ -- unhandled response

有没有人遇到过这种情况?我觉得解决方案很简单,但我无法解决它。

谢谢你的时间,

-javi

最佳答案

The Web server (running the Web site) is currently unable to handle the HTTP request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. Some servers in this state may also simply refuse the socket connection, in which case a different error may be generated because the socket creation timed out.



以上是什么 503方法。你的输出清楚地表明 Net::HTTPServiceUnavailable
错误不是来自您的目的。如果我是你,我实际上会确认目标服务器以查看它是否已启动。

关于RUBY -Mechanize::ResponseCodeError: 503 => Net::HTTPServiceUnavailable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43836615/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com