puppeteer-extra: [Bug] bet365.com stopped working 2 days ago
edit: Further discussion should happen on the community discord
Describe the bug
- Im trying to scrap bet365 website
- Expect open the website bet365.com without problems.
- I was using puppeteer-extra-plugin-stealth for this purpose but is not working anymore from 2 days ago.
Code Snippet
const fs = require('fs')
const json = require('JSON')
const puppeteer = require('puppeteer-extra')
const { Bot } = require('tgapi')
const mysql = require('mysql')
const StealthPlugin = require('puppeteer-extra-plugin-stealth')
var dbConfig ={
host : 'localhost',
port : '3307',
user : 'xxxx',
password : 'xxxx',
database : 'mydb'
}
let connection = mysql.createPool(dbConfig);
connection.setMaxListeners(20)
puppeteer.use(StealthPlugin())
//Ejecucion de Puppeteer
puppeteer.launch({ args: ['--start-maximized'], headless: false }).then(async browser => {
console.log('Ejecutando script...')
const page = await browser.newPage()
await page.goto('https://www.bet365.es/#/IP/B1');
etc...
Versions
System: OS: Windows 10 10.0.18363 CPU: (8) x64 Intel® Core™ i7-4790K CPU @ 4.00GHz Memory: 8.31 GB / 15.86 GB Binaries: Node: 12.17.0 - C:\Program Files\nodejs\node.EXE npm: 6.14.10 - ~\AppData\Roaming\npm\npm.CMD
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 63 (10 by maintainers)
Hello friends,
Here I’ve created a temporary fix for bet365
Run this and it should work
Will take a closer look on free time
Removing stealth plugin and adding ‘–disable-blink-features=AutomationControlled’ its working again
Hello friends, I’ve created a new fix.
For Python users, put it to like “Page.addScriptToEvaluateOnNewDocument”
The bet365 site has very strict IP checks. If you open the site with an:
Some more observations:
--remote-debugging-port=9992
) withpuppeteer.connect({browserURL: 'http://localhost:9992'})
: it’s again stuck on loading the site. This means they detect something in the way the page is opened.We need to investigate what they detect exactly in newly opened pages.
None of this you mentioned in your first comment, I recommend adding as much context as possible if you depend on others helping you.
Try to purge or remove
userDataDir
.The programmer of bet365 is monitoring this issue. Everyone please do not update solution here.
@FabianoDevX either you didn’t try the
querySelector
workaround, you didn’t read the other comments here or you didn’t mention trying it - none of these are good netiquette. 😉Try on
await page.evaluateOnNewDocument(() => {
addwindows.qs = document.querySelector
then, on every
evaluate
Friends, you can also use this one
Im having troubles with this workaround…
When I try to make an a evaluate with queryselector or queryselectorall the pages freeze automatically and chromium begin to leak memory as fuck. I cant use the console webbrowser, i cant retrieve any data from the website…
Anyone has this trouble?
You need to run
await page.evaluateOnNewDocument(() => {
beforeawait page.goto('https://bet365.com');
Workaround for the time being: