【问题标题】:Accessing Amazon with Guzzle gives 403 forbidden使用 Guzzle 访问亚马逊会出现 403 被禁止
【发布时间】:2018-04-18 04:00:17
【问题描述】:

我试图以编程方式访问以下网址:

https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=garlic+press

$response = $client->get($url, ['proxy' => 'http://someproxy','timeout' => 10, 'cookies' => $jar]);

我收到以下回复:

我的请求似乎被云端拒绝了。

【问题讨论】:

    标签: symfony curl web-scraping proxy guzzle


    【解决方案1】:

    您应该尝试将您的 User-Agent 标头设置为合理的值。可能是 CloudFront 拒绝向未知用户代理提供内容。

    【讨论】:

    猜你喜欢
    • 2018-12-21
    • 1970-01-01
    • 1970-01-01
    • 2015-08-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-03
    • 1970-01-01
    相关资源
    最近更新 更多