[英]Getting 403 when executing request from amazon server
Very same code works fine from other locations, but whenever is run from amazon server it gets 403.非常相同的代码在其他位置运行良好,但无论何时从亚马逊服务器运行,它都会得到 403。
We tried "everything":我们尝试了“一切”:
PS as far what i know it's fine from some other hosting services, only Amazon seems to be blocked. PS 据我所知,其他一些托管服务还不错,只有亚马逊似乎被屏蔽了。
Requests are not passed from any app / any language, including Postman but they're fine when any browser is used.请求不会从任何应用程序/任何语言(包括 Postman)传递,但在使用任何浏览器时都可以。 So it's like "something" detects the original source of request and if request comes from amz "it" blocks the request.所以这就像“某物”检测到请求的原始来源,如果请求来自 amz,“它”会阻止该请求。 Everything is fine when not used from amz servers)不从 amz 服务器使用时一切都很好)
You shouldn't use C# for web scraping, this language isn't designed to do that.您不应该使用 C# 进行 web 抓取,这种语言不是为此而设计的。 You may consider using more flexible technology like Python which has several libraries for web scraping purposes, which will solve your trouble.您可以考虑使用更灵活的技术,例如 Python,它有几个用于 web 抓取目的的库,这将解决您的麻烦。
You can't use one language to do everything.你不能用一种语言来做所有事情。 C# may not be bad choice for Windows desktop apps, but you can't do anything else. C# 对于 Windows 桌面应用程序来说可能是不错的选择,但您无能为力。
You can send your request to https://requestbin.com/ to analyze better what is going out from the Program and then change the missing parameters.您可以将您的请求发送到https://requestbin.com/以更好地分析程序输出的内容,然后更改缺少的参数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.