[英]403 response when making a get request
I'm getting a 403 response when making a get request to this website ( https://volusia.county-taxes.com ) using python3 in aws EC2 server. 在AWS EC2服务器中使用python3向此网站( https://volusia.county-taxes.com )进行get请求时,我收到403响应。 But I'm getting success response in my local system using same code.
但是我正在使用相同的代码在本地系统中获得成功响应。
Please help me. 请帮我。 Why im not able to make a get request in aws ec2 server?
为什么我无法在AWS EC2服务器中发出获取请求?
In aws EC2 server 在AWS EC2服务器中
import requests
requests.get('https://volusia.county-taxes.com')
<Response [403]>
In my local system 在我的本地系统中
import requests
requests.get('https://volusia.county-taxes.com')
<Response [200]>
Can't say for sure, but a 403 is a 'forbidden' code, and it is not all that unusual for some websites to block traffic from the ec2 ip ranges to cut down on the number of bots/scrapers that tend to abuse websites and are often run on aws and other cloud providers. 不能肯定地说,但是403是一个“禁止”代码,对于某些网站来说,阻止来自ec2 ip范围的流量以减少倾向于滥用网站的漫游器/抓取工具的数量并不太常见并且通常在AWS和其他云提供商上运行。
Its possible that either the entire ec2 ip range is blocked, or else just some of the ips - especially if you have been running some sort of scraper from that ip, it may be blacklisted. 可能整个ec2 ip范围被阻止,或者仅某些ip被阻止-尤其是如果您已经从该ip运行某种爬虫,则它可能会被列入黑名单。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.