r/selenium • u/puppetbets • Jun 29 '20
Bet365 blocks the python + selenium chromedriver combo
There is actually not much code to share. Until last week, you could load Bet365 main page with Selenium + python. At least since yesterday, the attempts are blocked and the page doesn't load.
Code is as follows
from selenium import webdriver
browser=webdriver.Chrome(r'chromedriver.exe')
browser.get('https://www.bet365.es')
The page remains gray without loading the inside content. Right click button to inspect the page doesn't work and the aspect is similar to when they block your IP temporarily, although in a regular browser the page does load, so I guess this is not an IP block.
I didn't see distil inspecting the web so perhaps this isn't either. In short, I don't know what is happening or how to fix it.
2
u/puppetbets Sep 07 '20
Sorry for the delay. As several people has DM for a solution for this, I'll share what finaly worked.
options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
browser=webdriver.Chrome(options=options,executable_path=r"chromedriver.exe")
browser.execute_cdp_cmd("Page.addScriptToEvaluateOnNewDocument", {
"source": """
Object.defineProperty(navigator, 'webdriver', {
get: () => undefined
})
"""
})
browser.execute_cdp_cmd('Network.setUserAgentOverride',
{"userAgent": 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.53 Safari/537.36'})
browser.get(url)
1
1
1
Nov 15 '20
"Page.addScriptToEvaluateOnNewDocument", {
"source": """
Object.defineProperty(navigator, 'webdriver', {
get: () => undefined
})
"""
}
Thanks man. But can you tell us why this works, and what it does? Thank you so much in advance!
2
1
Jun 30 '20
Unfortunately you have been banned on this site.
Remember, Selenium and automating tools are for automating work, not for generate traffic on web pages.
Any site dont want non real user. Their sponsors dont pay for it.
1
u/puppetbets Jun 30 '20
I don't think I'm banned. If instead of with selenium I open the web in a regular chrome, everything works just fine. If I try a different computer or a different network, the problem remains the same.
1
u/gabfelp Nov 29 '20
The solution here worked until this weekend, it seems that bet365 has fortified bot verification ...
Is it possible to go unnoticed now? I've tried using GeckoDriver and ChromeDriver with the options above but nothing works.
1
1
u/EstablishmentSecure4 Nov 30 '20
hit me up
1
Nov 30 '20
[removed] — view removed comment
1
u/AutoModerator Nov 30 '20
This submission has been removed because it looks suspicious to automod (a). If this was done in error, please message the moderators. %0D%0DMy issue is...).
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/teddiur_ Jun 30 '20
I've read on stackoverflow that using Firefox would solve the problem, but I couldn't make my geckodriver work. I've also tried to change the user agent, but didn't work either. In short, I don't know man
1
Jun 30 '20
selenium docs says when you use selenium some sort of variable indicates that “automated browser” information shared with webside.(not as header) in docs it should be under advance topic
1
u/giorgosl Jul 01 '20
Did you try to the `enable-automation` exclude switch as described here? https://stackoverflow.com/questions/57298901/unable-to-hide-chrome-is-being-controlled-by-automated-software-infobar-within/57304986#57304986
1
u/leux10 Jul 08 '20
I got the same problem, did you get pass it somehow?
1
1
Jul 09 '20
[removed] — view removed comment
1
u/AutoModerator Jul 09 '20
This submission has been removed because it looks suspicious to automod (a). If this was done in error, please message the moderators.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
0
Aug 31 '20
[deleted]
1
u/AutoModerator Aug 31 '20
This submission has been removed because it looks suspicious to automod (a). If this was done in error, please message the moderators. %0D%0DMy issue is...).
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/jufu_edu Jul 10 '20
I have the same problem.
I have tried changing $acd within chromedriver.exe, also changing user agent in Firefox. And I still get the gray screen.
Did Anyone get finally manage to fix it?
1
1
u/EstablishmentSecure4 Jul 19 '20
hit me up, i can do this.
1
1
u/godplayai Sep 02 '20
how to fix selenium get banned? i use mobile emulation, but bet365 banned mobile version recently
1
1
1
u/Electronic_Study_668 Sep 04 '20
I have the same issue. It worked well. Later when I had this issue I switched to Firefox. Later to mobile version. And right now chrome/firefox and pc/mobile version dont work any option
1
u/KikoNet13 Sep 05 '20
Same problem here
0
Sep 05 '20
[deleted]
1
u/AutoModerator Sep 05 '20
This submission has been removed because it looks suspicious to automod (a). If this was done in error, please message the moderators. %0D%0DMy issue is...).
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Wild-Kaleidoscope-54 Nov 29 '20
Did bet365 block the combo again? The solution provided here worked for me until yesterday. Anybody having same problems?
1
u/EstablishmentSecure4 Nov 30 '20
WHO HAS PROBLEMS AFTER NOVEMBER 29. SEND ME MESSAGE FOR FIX
1
Dec 02 '20
[removed] — view removed comment
1
u/AutoModerator Dec 02 '20
This submission has been removed because it looks suspicious to automod (a). If this was done in error, please message the moderators. %0D%0DMy issue is...).
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
1
Jul 02 '20
[removed] — view removed comment
1
u/AutoModerator Jul 02 '20
This submission has been removed because it looks suspicious to automod (a). If this was done in error, please message the moderators.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
Sep 04 '20
[removed] — view removed comment
1
u/AutoModerator Sep 04 '20
This submission has been removed because it looks suspicious to automod (a). If this was done in error, please message the moderators. %0D%0DMy issue is...).
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
Dec 02 '20
[removed] — view removed comment
1
u/AutoModerator Dec 02 '20
This submission has been removed because it looks suspicious to automod (a). If this was done in error, please message the moderators. %0D%0DMy issue is...).
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
u/al_mc_y Jun 30 '20
Just a thought, has your chrome version updated recently? I'm wondering if there might be an issue with the version of your chromedriver vs chrome itself.