"本网站的所有者基于浏览器的签名&QUOT禁止您的访问; ...在Python程序的URL请求 [英] "The owner of this website has banned your access based on your browser's signature" ... on a url request in a python program

查看:1939
本文介绍了"本网站的所有者基于浏览器的签名&QUOT禁止您的访问; ...在Python程序的URL请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在做一个简单的要求,对蟒蛇(Entought冠是precise),与urllib2的,服务器拒绝我访问:

When doing a simple request, on python (Entought Canopy to be precise), with urllib2, the server denies me access :

data = urllib.urlopen(an url i cannot post because of reputation, params)

print data.read()

错误:

Access denied | play.pokemonshowdown.com used CloudFlare to restrict access

The owner of this website (play.pokemonshowdown.com) has banned your access based on your browser's signature (14e894f5bf8d0920-ua48).

这是一个显然是一个通用的问题,所以我在网上找到了一些线索。

This is a apparently a generic issue, so I found several clues on the web.

<一个href=\"https://support.cloudflare.com/hc/en-us/articles/200171806-Error-1010-The-owner-of-this-website-has-banned-your-access-based-on-your-browser-s-signature\">https://support.cloudflare.com/hc/en-us/articles/200171806-Error-1010-The-owner-of-this-website-has-banned-your-access-based-on-your-browser-s-signature:

有一个防火墙,代理服务器,浏览器插件或扩展可能会扔假阳性。尝试访问的网站使用不同的浏览器访问该网站的另一种方式。

A firewall, proxy, a browser plugin or extension may be throwing a false positive. Try visiting the site with a different browser as an alternative way of accessing the site.

<一个href=\"https://support.cloudflare.com/hc/en-us/articles/200170176-Why-am-I-getting-a-Checking-your-Browser-before-accessing-message-before-entering-a-site-on-CloudFlare-\">https://support.cloudflare.com/hc/en-us/articles/200170176-Why-am-I-getting-a-Checking-your-Browser-before-accessing-message-before-entering-a-site-on-CloudFlare-:

在我受到攻击,访问前检查您的浏览器(insertsite.com)时,该网站所有者开启称为DDoS防护和缓释工具发生。该页面一般会消失,授予您访问的5秒钟后网站。

The "Checking your browser before accessing (insertsite.com) occurs when the site owner has turned on a DDoS protection and mitigation tool called "I'm Under Attack". The page will generally go away and grant you access to the site after 5 seconds.

注意:您将需要有JavaScript和浏览器的Cookie开启以通过检查。检查到位,以确保你不是一个僵尸网络的一部分。

Note: You will need to have both JavaScript and Cookies turned on in your browser to pass the check. The check is in place to make sure that you are not part of a botnet."

的答案是相当清楚的,除了这一件事...... *我不使用任何浏览器!完成该请求低谷python程序,用了urllib.urlopen 的请求......

The answers are rather clear, except for this one thing ... *I'm not using any browser! The request is done trough a python program, with an urllib.urlopen request ...

这是否意味着我应该有一样,Cookie和JavaScript,... Enthought冠层打开?请问这句话让任何一句话呢?试图用编程控制台一个基本要求访问该网站时,我不太了解这个浏览器的具体检查什么激活。这就是为什么我要求你的帮助。

Does this mean I'm supposed to have, like, cookies and JavaScript turned on in ... Enthought Canopy? Does this sentence makes any sentence at all? I barely understand anything about this browser specific check activating when trying to access the site with a basic request from a programming console. And that's why I ask for your help.

为什么会发生?如何绕过它?

Why does it happen? How to bypass it?

推荐答案

这个网站是检查是不是你的浏览器,它的用户代理 - 一个字符串,客户端程序(浏览器,Python脚本或其他)最后的发送一个请求头。您可以指定其他用户代理,CF 上urllib2.urlopen 更改用户代理。

What this site is "checking" is not your browser, it's the "user agent" - a string your client program (browser, Python script or whatever) eventually sends as a request header. You can specify another user agent, cf Changing user agent on urllib2.urlopen.

这篇关于&QUOT;本网站的所有者基于浏览器的签名&QUOT禁止您的访问; ...在Python程序的URL请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆