"The owner of this website has banned your access based on your browser's signature" ... on a url request in a python program
Asked Answered
H

3

18

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()

Error:

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.

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.

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-:

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.

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."

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 ...

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?

Hereupon answered 23/7, 2014 at 14:47 Comment(1)
Try changing your user agent. See this post.Destroyer
U
17

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.

Unitive answered 23/7, 2014 at 15:30 Comment(1)
I face same issue I change UA in PHP and I still got the same message .Abbotsun
H
0

I just saw it with Safari from my home IP, looking at a site I author! After performing a login to cloudflare website and hitting refresh its back. Probably my mobile internet was too slow (in New Zealand) and the javascript did not load in time? I have DDOS protection and "under attack" enabled AFAIK.

Hulton answered 26/9, 2020 at 15:36 Comment(0)
U
-1

Since I never saw this answered - I had 3 browser extensions on MS Edge. Meeting Scheduler, Honey, and Dark Reader (Dark Reader altered page details to allow it to support a sudo-dark-mode). No CloudFare sites would let me through. But in Incognito mode, they would. Couldn't figure out why.

I removed all three and CloudFare stopped causing me issues.

Check your browser extensions. Can be easy to forget, it's likely that one is misbehaving.

Uni answered 14/4 at 12:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.